http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58233
Bug ID: 58233 Summary: null pointer cm in gfc_conv_structure at fortran/trans-expr.c:6132 Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: zeccav at gmail dot com ! null pointer cm in gfc_conv_structure at fortran/trans-expr.c:6132 ! if (!c->expr || (gcc_assert(cm),(cm->attr.allocatable && ! cm->attr.flavor != FL_PROCEDURE))) ! compiling the following type t integer g end type type(t) :: u=t(1) data u%g /2/ ! should emit diagnostic here end To show the null pointer I added a gcc_assert(cm) !gfbug63.f: In function ‘MAIN__’: !gfbug63.f:2:0: internal compiler error: in gfc_conv_structure, at fortran/trans-expr.c:6132 ! type t ! ^ !0x5ba439 gfc_conv_structure(gfc_se*, gfc_expr*, int) ! ../../gcc-4.8.1/gcc/fortran/trans-expr.c:6132 !0x5ba6a0 gfc_conv_initializer(gfc_expr*, gfc_typespec*, tree_node*, bool, bool, bool) ! ../../gcc-4.8.1/gcc/fortran/trans-expr.c:5690 !0x5aa1bd gfc_get_symbol_decl(gfc_symbol*) ! ../../gcc-4.8.1/gcc/fortran/trans-decl.c:1501 !0x5aab2f generate_local_decl ! ../../gcc-4.8.1/gcc/fortran/trans-decl.c:4606 !0x57e133 do_traverse_symtree ! ../../gcc-4.8.1/gcc/fortran/symbol.c:3575 !0x5aeaf2 generate_local_vars ! ../../gcc-4.8.1/gcc/fortran/trans-decl.c:4765 !0x5aeaf2 gfc_generate_function_code(gfc_namespace*) ! ../../gcc-4.8.1/gcc/fortran/trans-decl.c:5339 !0x552ab0 translate_all_program_units ! ../../gcc-4.8.1/gcc/fortran/parse.c:4474 !0x552ab0 gfc_parse_file() ! ../../gcc-4.8.1/gcc/fortran/parse.c:4688 !0x58ddf5 gfc_be_parse_file ! ../../gcc-4.8.1/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.