https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66347

            Bug ID: 66347
           Summary: Seg fault (ICE) on compile
           Product: gcc
           Version: 5.1.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: wbrisken at gmail dot com
  Target Milestone: ---

Created attachment 35656
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35656&action=edit
fortran test case causing ICE

I have an example of code that would compile without problem with gfortran
4.4.7 and gfortran 4.8.4 but causes ICE on the recent gfortran SVN 5.1 branch. 
This is not my own code and I know little of fortran programming so apologies
if the code is ugly or if it is not a minimal test case.

Compiler version causing crash:

wbrisken@shiitake sked> gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/export/home/shiitake/gcc/libexec/gcc/x86_64-unknown-linux-gnu/5.1.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure --prefix=/export/home/shiitake/gcc/
Thread model: posix
gcc version 5.1.1 20150523 (GCC)

System type:

Linux RHEL 6.6 running on x86-64 CPU

GCC build options:

../gcc/configure --prefix=/export/home/shiitake/gcc/

Compile command: 

gfortran -save-temps -finit-local-zero  -fno-automatic -fno-underscoring -C -w
-g -O2 -c -o crash.o crash3.f

Compiler output to screen:

f951: internal compiler error: Segmentation fault
0xa7f86f crash_signal
        ../../gcc/gcc/toplev.c:383
0x6a08c2 apply_default_init_local
        ../../gcc/gcc/fortran/resolve.c:10951
0x6a08c2 resolve_fl_variable
        ../../gcc/gcc/fortran/resolve.c:11213
0x6a08c2 resolve_symbol
        ../../gcc/gcc/fortran/resolve.c:13756
0x6b6f0b do_traverse_symtree
        ../../gcc/gcc/fortran/symbol.c:3646
0x6a16f2 resolve_types
        ../../gcc/gcc/fortran/resolve.c:14977
0x69d320 gfc_resolve(gfc_namespace*)
        ../../gcc/gcc/fortran/resolve.c:15081
0x688c46 gfc_parse_file()
        ../../gcc/gcc/fortran/parse.c:5476
0x6c83d5 gfc_be_parse_file
        ../../gcc/gcc/fortran/f95-lang.c:228
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Preprocessed output file:

Not generated.  Perhaps Seg Fault happened too early.



I hope this bug report is useful and complete.

Cheers,

Walter

Reply via email to