http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57306
Bug ID: 57306 Summary: ICE on valid with class pointer assignment Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: abensonca at gmail dot com The following causes an ICE with gfortran 4.9.0 r198983: module t type :: c end type c type(c), target :: cd class(c), public, pointer :: cc => cd end module t $ gfortran -v Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/home/abenson/Galacticus/Tools/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc-trunk/configure --prefix=/home/abenson/Galacticus/Tools --enable-languages=c,c++,fortran --disable-multilib --with-gmp=/home/abenson/Galacticus/Tools Thread model: posix gcc version 4.9.0 20130516 (experimental) (GCC) $ gfortran -c bug.F90 -o bug.o bug.F90:7:0: internal compiler error: in gfc_conv_structure, at fortran/trans-expr.c:6027 class(c), public, pointer :: cc => cd ^ 0x5be449 gfc_conv_structure(gfc_se*, gfc_expr*, int) ../../gcc-trunk/gcc/fortran/trans-expr.c:6027 0x5be610 gfc_conv_initializer(gfc_expr*, gfc_typespec*, tree_node*, bool, bool, bool) ../../gcc-trunk/gcc/fortran/trans-expr.c:5606 0x5a8cd6 gfc_get_symbol_decl(gfc_symbol*) ../../gcc-trunk/gcc/fortran/trans-decl.c:1500 0x5aeb02 gfc_create_module_variable ../../gcc-trunk/gcc/fortran/trans-decl.c:4144 0x572ed3 do_traverse_symtree ../../gcc-trunk/gcc/fortran/symbol.c:3571 0x5aef52 gfc_generate_module_vars(gfc_namespace*) ../../gcc-trunk/gcc/fortran/trans-decl.c:4543 0x588ec1 gfc_generate_module_code(gfc_namespace*) ../../gcc-trunk/gcc/fortran/trans.c:1738 0x547687 translate_all_program_units ../../gcc-trunk/gcc/fortran/parse.c:4456 0x547687 gfc_parse_file() ../../gcc-trunk/gcc/fortran/parse.c:4666 0x583a25 gfc_be_parse_file ../../gcc-trunk/gcc/fortran/f95-lang.c:189 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.