http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49436
janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |janus at gcc dot gnu.org --- Comment #1 from janus at gcc dot gnu.org 2011-06-16 12:00:52 UTC --- (In reply to comment #0) > As I interpret it, the standard says that if an object passed as an actual > argument is also accessible in a subprogram through other means, then this can > only be modified through the corresponding dummy argument (12.4.1.6). I guess you refer to this part: (2) If the value of any part of the entity is affected through the dummy argument, then at any time during the execution of the procedure, either before or after the deļ¬nition, it may be referenced only through that dummy argument unless (a) the dummy argument has the POINTER attribute, (b) the part is all or part of a pointer subobject, or (c) the dummy argument has the TARGET attribute, the dummy argument does not have INTENT (IN), the dummy argument is a scalar object or an assumed-shape array, and the actual argument is a target other than an array section with a vector subscript. And indeed I would interpret it in the same way as you do. However, the question is whether the standard requires the *compiler* to enforce this restriction, or if it is simply a restriction that the programmer is supposed to follow. Are you aware of any compiler which enforces this restriction?