This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/69360] loop optimization produces invalid code when a common array has dimension 1 in some files
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 19 Jan 2016 17:58:16 +0000
- Subject: [Bug fortran/69360] loop optimization produces invalid code when a common array has dimension 1 in some files
- Auto-submitted: auto-generated
- References: <bug-69360-4 at http dot gcc dot gnu dot org/bugzilla/>
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.