[Bug fortran/54426] New: [4.8 Regression] FAIL: gfortran.dg/common_6.f90 -O (internal compiler error) on powerpc-apple-darwin9

dominiq at lps dot ens.fr gcc-bugzilla@gcc.gnu.org
Thu Aug 30 19:01:00 GMT 2012


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

             Bug #: 54426
           Summary: [4.8 Regression] FAIL: gfortran.dg/common_6.f90  -O
                    (internal compiler error) on powerpc-apple-darwin9
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dominiq@lps.ens.fr
                CC: burnus@net-b.de
              Host: powerpc-apple-darwin9
            Target: powerpc-apple-darwin9
             Build: powerpc-apple-darwin9


On powerpc-apple-darwin9 compiling gfortran.dg/common_6.f90 gives an ICE after
revision 190710:

...
common ///g/    ! { dg-error "Syntax error" }
         1
Error: Syntax error in COMMON statement at (1)
f951: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

A reduced test is

! somme comment
common /b/x/c/  ! { dg-error "Syntax error" }
common y/d/     ! { dg-error "Syntax error" }
common /e//f/   ! { dg-error "Syntax error" }
end

where the first comment line is needed to get the ICE. The backtrace is

#0  resolve_common_vars (sym=<value temporarily unavailable, due to
optimizations>, named_common=<value temporarily unavailable, due to
optimizations>) at ../../rel_work/gcc/fortran/resolve.c:911
#1  0x0007772c in resolve_common_blocks (common_root=0x41105370) at
../../rel_work/gcc/fortran/resolve.c:960
#2  0x000889f0 in resolve_types (ns=0x4182c000) at
../../rel_work/gcc/fortran/resolve.c:14209
#3  0x0007bfc0 in gfc_resolve (ns=0x4182c000) at
../../rel_work/gcc/fortran/resolve.c:14322
#4  0x000717f8 in gfc_parse_file () at ../../rel_work/gcc/fortran/parse.c:4398
#5  0x000aeb3c in gfc_be_parse_file () at
../../rel_work/gcc/fortran/f95-lang.c:191
#6  0x00589190 in compile_file () at ../../rel_work/gcc/toplev.c:546
#7  0x0058ab74 in toplev_main (argc=2, argv=0xbfffda74) at
../../rel_work/gcc/toplev.c:1863
#8  0x00002024 in start ()

If I revert the patch for gcc/fortran/match.c, the ICE goes away without
regression (full gfortran test on powerpc-apple-darwin9). I did not find the
logic for this part of the patch at
http://gcc.gnu.org/ml/fortran/2012-08/msg00180.html.



More information about the Gcc-bugs mailing list