This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51267] loop optimization error using LOC function
- From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 01 May 2012 09:45:54 +0000
- Subject: [Bug fortran/51267] loop optimization error using LOC function
- Auto-submitted: auto-generated
- References: <bug-51267-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51267
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |tkoenig at gcc dot gnu.org
Resolution| |INVALID
--- Comment #10 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2012-05-01 09:45:54 UTC ---
(In reply to comment #9)
> Is there any progress with this? The issue persists with gcc 4.7.0 final and
> the workaround with -fno-tree-dse stopped working.
The test case violates the standard. The compiler knows that the array
tab cannot be accessed in a legal way, and that the stores into array
ius are not used later. Therefore, they are removed.
This part of Fortran semantics allows a lot of optimizations, and we
will not make other programs slower to accommodate this non-standard
usage.
So, your best bet is to simulate dynamic memory some other way, for
example by handing out parts of a COMMON block, or use F90+ memory
management.
Your second best bet is to compile all relevant code parts with -O0,
and keep your fingers crossed that it keeps on working. This is likely,
but not guaranteed.
Closing as invalid.