[Bug fortran/50463] [4.6/4.7 Regression] -ftree-dse leeds to wrong code with gfortran

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Sep 26 09:30:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50463

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-09-26 09:08:26 UTC ---
Invalid.

      COMMON / / ARRAY(1)

      ARRAY(START) = CHECK
      ARRAY(LIMIT) = CHECK

the first store is dead as the only valid values for both START and
LIMIT are 1 because of the size specification in the declaration of
ARRAY.

If the fortran standard makes accessing ARRAY(i) with i != 1 well-defined
then the Frontend may not provide a declaration of ARRAY with size 1
to the middle-end.



More information about the Gcc-bugs mailing list