This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/69360] loop optimization produces invalid code when a common array has dimension 1 in some files


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69360

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2016-01-19
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
The code is indeed invalid on two counts. The first one is named commons of
different sizes (related to/duplicate of pr44882). The second is out of bound
access: the array 'e' is defined with only one element, accessing e(2) is
invalid (caught if the code is compiled with -fcheck=bounds). Thus the compiler
can do whatever it wants, e.g., considers that the loop is run only once. This
should be disabled by the option no-aggressive-loop-optimizations, but it is
not.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]