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: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 02 May 2012 12:21:45 +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
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.)