http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56674
Bug #: 56674 Summary: ICE in check_sym_interfaces Classification: Unclassified Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: joost.vandevond...@mat.ethz.ch The following invalid testcase produces and ICE with current trunk. > cat bug.f90 MODULE kinds INTEGER, PARAMETER :: dp=8,int_8=8 END MODULE MODULE realspace_grid_types USE kinds, ONLY: dp, int_8 PUBLIC :: realspace_grid_type,& realspace_grid_input_type END TYPE realspace_grid_desc_type TYPE realspace_grid_desc_p_type TYPE(realspace_grid_desc_type), POINTER :: rs_desc END TYPE realspace_grid_desc_p_type CONTAINS SUBROUTINE rs_grid_create_descriptor ( desc, pw_grid, input_settings, error) TYPE(realspace_grid_input_type), & IF ( pw_grid % para % mode == PW_MODE_LOCAL ) THEN END SUBROUTINE END MODULE realspace_grid_types > gfortran -v bug.f90 Driving: gfortran -v bug.f90 -l gfortran -l m -shared-libgcc Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/data/vjoost/gnu/gcc_trunk/install/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc/configure --prefix=/data/vjoost/gnu/gcc_trunk/install --enable-languages=c,c++,fortran --disable-multilib --enable-plugins --enable-lto --disable-bootstrap Thread model: posix gcc version 4.9.0 20130321 (experimental) [trunk revision 196847] (GCC) COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /data/vjoost/gnu/gcc_trunk/install/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/f951 bug.f90 -quiet -dumpbase bug.f90 -mtune=generic -march=x86-64 -auxbase bug -version -fintrinsic-modules-path /data/vjoost/gnu/gcc_trunk/install/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/finclude -o /tmp/ccaTm8lw.s GNU Fortran (GCC) version 4.9.0 20130321 (experimental) [trunk revision 196847] (x86_64-unknown-linux-gnu) compiled by GNU C version 4.7.2 20120816 (prerelease) [gcc-4_7-branch revision 190437], GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 GNU Fortran (GCC) version 4.9.0 20130321 (experimental) [trunk revision 196847] (x86_64-unknown-linux-gnu) compiled by GNU C version 4.7.2 20120816 (prerelease) [gcc-4_7-branch revision 190437], GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 bug.f90:8.5: END TYPE realspace_grid_desc_type 1 Error: Expecting END MODULE statement at (1) bug.f90:14.35: TYPE(realspace_grid_input_type), & 1 Error: Derived type 'realspace_grid_input_type' at (1) is being used before it is defined bug.f90:10.55: TYPE(realspace_grid_desc_type), POINTER :: rs_desc 1 Error: The pointer component 'rs_desc' of 'realspace_grid_desc_p_type' at (1) is a type that has not been declared f951: internal compiler error: Segmentation fault 0x994a0f crash_signal ../../gcc/gcc/toplev.c:332 0x55650b show_locus ../../gcc/gcc/fortran/error.c:310 0x556d77 error_print ../../gcc/gcc/fortran/error.c:666 0x5573a8 gfc_error(char const*, ...) ../../gcc/gcc/fortran/error.c:961 0x55fda7 check_interface0 ../../gcc/gcc/fortran/interface.c:1469 0x562194 check_sym_interfaces ../../gcc/gcc/fortran/interface.c:1581 0x5c8023 do_traverse_symtree ../../gcc/gcc/fortran/symbol.c:3575 0x562279 gfc_check_interfaces(gfc_namespace*) ../../gcc/gcc/fortran/interface.c:1691 0x5b3bbb resolve_types ../../gcc/gcc/fortran/resolve.c:14915 0x5a7773 gfc_resolve ../../gcc/gcc/fortran/resolve.c:14999 0x5a7773 gfc_resolve(gfc_namespace*) ../../gcc/gcc/fortran/resolve.c:14987 0x59d287 gfc_parse_file() ../../gcc/gcc/fortran/parse.c:4602 0x5da8d5 gfc_be_parse_file ../../gcc/gcc/fortran/f95-lang.c:189 Please submit a full bug report,