[Bug fortran/51267] loop optimization error using LOC function
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed May 2 12:22:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51267
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #11 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-05-02 12:21:45 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.
As post script:
The issue also exists with other compilers: ifort 12.1 does the same
optimization with -O1 as gfortran; as does pathf95 (with -O2).
You could try to mark the variables as VOLATILE - at least for the test case,
VOLATILE :: tab, ius
solves the issue for gfortran and ifort. Thomas mentioned -O0, which is also an
alternative.
However, the only true solution is to fix the code. (I realize that it won't be
easy for a large code like Code Aster.)
More information about the Gcc-bugs
mailing list