https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89661
Manfred Schwarb <manfred99 at gmx dot ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manfred99 at gmx dot ch --- Comment #4 from Manfred Schwarb <manfred99 at gmx dot ch> --- I see it too on i686 for current trunk: Instrumenting the testsuite checks with /usr/bin/env LIBC_FATAL_STDERR_=1 MALLOC_PERTURB_=B MALLOC_CHECK_=3 make check 9 | class(t2), pointer :: q(2) ! { dg-error "must have a deferred shape" } | 1 Error: Pointer array component of structure at (1) must have a deferred shape f951: internal compiler error: Segmentation fault 0x8e61e8d crash_signal ../../gcc-trunk-source/gcc/gcc/toplev.c:328 0x860f511 resolve_component ../../gcc-trunk-source/gcc/gcc/fortran/resolve.c:14318 0x86107fb resolve_fl_derived0 ../../gcc-trunk-source/gcc/gcc/fortran/resolve.c:14753 0x8610d29 resolve_fl_derived ../../gcc-trunk-source/gcc/gcc/fortran/resolve.c:14882 0x8611ad0 resolve_symbol ../../gcc-trunk-source/gcc/gcc/fortran/resolve.c:15251 0x8636a81 do_traverse_symtree ../../gcc-trunk-source/gcc/gcc/fortran/symbol.c:4150 0x8636b18 gfc_traverse_ns(gfc_namespace*, void (*)(gfc_symbol*)) ../../gcc-trunk-source/gcc/gcc/fortran/symbol.c:4175 0x8615988 resolve_types ../../gcc-trunk-source/gcc/gcc/fortran/resolve.c:17175 0x8615dd8 gfc_resolve(gfc_namespace*) ../../gcc-trunk-source/gcc/gcc/fortran/resolve.c:17290 0x85eb469 resolve_all_program_units ../../gcc-trunk-source/gcc/gcc/fortran/parse.c:6245 0x85ebb66 gfc_parse_file() ../../gcc-trunk-source/gcc/gcc/fortran/parse.c:6492 0x864043d gfc_be_parse_file ../../gcc-trunk-source/gcc/gcc/fortran/f95-lang.c:210 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. With valgrind, the following analysis is shown: ==72395== Invalid read of size 4 ==72395== at 0x860F4C3: resolve_component(gfc_component*, gfc_symbol*) (resolve.c:14304) ==72395== by 0x86107FB: resolve_fl_derived0(gfc_symbol*) (resolve.c:14753) ==72395== by 0x8610D29: resolve_fl_derived(gfc_symbol*) (resolve.c:14882) ==72395== by 0x8611AD0: resolve_symbol(gfc_symbol*) (resolve.c:15251) ==72395== by 0x8636A81: do_traverse_symtree(gfc_symtree*, void (*)(gfc_symtree*), void (*)(gfc_symbol*)) (symbol.c:4150) ==72395== by 0x8636B18: gfc_traverse_ns(gfc_namespace*, void (*)(gfc_symbol*)) (symbol.c:4175) ==72395== by 0x8615988: resolve_types(gfc_namespace*) (resolve.c:17175) ==72395== by 0x8615DD8: gfc_resolve(gfc_namespace*) (resolve.c:17290) ==72395== by 0x85EB469: resolve_all_program_units(gfc_namespace*) (parse.c:6245) ==72395== by 0x85EBB66: gfc_parse_file() (parse.c:6492) ==72395== by 0x864043D: gfc_be_parse_file() (f95-lang.c:210) ==72395== by 0x8E62281: compile_file() (toplev.c:458) ==72395== Address 0x46e99e4 is 116 bytes inside a block of size 204 free'd ==72395== at 0x4031B37: free (in /usr/lib64/valgrind/vgpreload_memcheck-x86-linux.so) ==72395== by 0x8635090: gfc_free_symbol(gfc_symbol*) (symbol.c:3096) ==72395== by 0x863515D: gfc_release_symbol(gfc_symbol*) (symbol.c:3123) ==72395== by 0x8635FCA: gfc_restore_last_undo_checkpoint() (symbol.c:3700) ==72395== by 0x863606B: gfc_undo_symbols() (symbol.c:3731) ==72395== by 0x85E60B0: reject_statement() (parse.c:2633) ==72395== by 0x85DE291: match_word(char const*, match (*)(), locus*) (parse.c:70) ==72395== by 0x85DEE43: decode_statement() (parse.c:376) ==72395== by 0x85E4A6F: next_free() (parse.c:1279) ==72395== by 0x85E500C: next_statement() (parse.c:1511) ==72395== by 0x85E7256: parse_derived() (parse.c:3342) ==72395== by 0x85E7F06: parse_spec(gfc_statement) (parse.c:3883) ==72395== Block was alloc'd at ==72395== at 0x4032CC6: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-x86-linux.so) ==72395== by 0x9F4F125: xcalloc (xmalloc.c:162) ==72395== by 0x863517D: gfc_new_symbol(char const*, gfc_namespace*) (symbol.c:3134) ==72395== by 0x86356A0: gfc_get_sym_tree(char const*, gfc_namespace*, gfc_symtree**, bool) (symbol.c:3368) ==72395== by 0x863584F: gfc_get_symbol(char const*, gfc_namespace*, gfc_symbol**) (symbol.c:3421) ==72395== by 0x855E4D3: gfc_match_decl_type_spec(gfc_typespec*, int) (decl.c:4494) ==72395== by 0x8560A37: gfc_match_data_decl() (decl.c:6119) ==72395== by 0x85DE270: match_word(char const*, match (*)(), locus*) (parse.c:65) ==72395== by 0x85DEE43: decode_statement() (parse.c:376) ==72395== by 0x85E4A6F: next_free() (parse.c:1279) ==72395== by 0x85E500C: next_statement() (parse.c:1511) ==72395== by 0x85E7256: parse_derived() (parse.c:3342)