https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113397
Bug ID: 113397 Summary: [14 Regression] ICE: SIGSEGV in tree_check (tree.h:3611) with -fdump-ada-spec-slim on gcc.c-torture/execute/pr22061-2.c Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu This fails on the gcc.c-torture/execute/pr22061-2.c testcase with -fdump-ada-spec-slim Compiler output: $ x86_64-pc-linux-gnu-gcc -fdump-ada-spec-slim /repo/gcc-trunk/gcc/testsuite/gcc.c-torture/execute/pr22061-2.c -wrapper valgrind,-q ==1560== Invalid read of size 2 ==1560== at 0xF0BC45: tree_check (tree.h:3611) ==1560== by 0xF0BC45: check_type_name_conflict(pretty_printer*, tree_node*) (c-ada-spec.cc:1570) ==1560== by 0xF0E692: dump_ada_function_declaration(pretty_printer*, tree_node*, bool, bool, bool, int) (c-ada-spec.cc:1654) ==1560== by 0xF0FFA3: dump_ada_declaration(pretty_printer*, tree_node*, tree_node*, int) (c-ada-spec.cc:3135) ==1560== by 0xF11859: dump_ada_nodes (c-ada-spec.cc:826) ==1560== by 0xF11859: dump_ads (c-ada-spec.cc:3525) ==1560== by 0xF11859: dump_ada_specs(void (*)(char const*), int (*)(tree_node*, cpp_operation)) (c-ada-spec.cc:3604) ==1560== by 0xE0D6BF: c_parse_final_cleanups() (c-decl.cc:13416) ==1560== by 0xEFAE00: c_common_parse_file() (c-opts.cc:1319) ==1560== by 0x150D66D: compile_file() (toplev.cc:447) ==1560== by 0xDE6B0B: do_compile (toplev.cc:2152) ==1560== by 0xDE6B0B: toplev::main(int, char**) (toplev.cc:2308) ==1560== by 0xDE82EA: main (main.cc:39) ==1560== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==1560== /repo/gcc-trunk/gcc/testsuite/gcc.c-torture/execute/pr22061-2.c:8:1: internal compiler error: Segmentation fault 8 | } | ^ 0x150d36f crash_signal /repo/gcc-trunk/gcc/toplev.cc:317 0xf0bc45 tree_check(tree_node*, char const*, int, char const*, tree_code) /repo/gcc-trunk/gcc/tree.h:3611 0xf0bc45 check_type_name_conflict /repo/gcc-trunk/gcc/c-family/c-ada-spec.cc:1570 0xf0e692 dump_ada_function_declaration /repo/gcc-trunk/gcc/c-family/c-ada-spec.cc:1654 0xf0ffa3 dump_ada_declaration /repo/gcc-trunk/gcc/c-family/c-ada-spec.cc:3135 0xf11859 dump_ada_nodes /repo/gcc-trunk/gcc/c-family/c-ada-spec.cc:826 0xf11859 dump_ads /repo/gcc-trunk/gcc/c-family/c-ada-spec.cc:3525 0xf11859 dump_ada_specs(void (*)(char const*), int (*)(tree_node*, cpp_operation)) /repo/gcc-trunk/gcc/c-family/c-ada-spec.cc:3604 0xe0d6bf c_parse_final_cleanups() /repo/gcc-trunk/gcc/c/c-decl.cc:13416 0xefae00 c_common_parse_file() /repo/gcc-trunk/gcc/c-family/c-opts.cc:1319 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-7239-20240115095837-g8a1927856a1-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --disable-bootstrap --with-cloog --with-ppl --with-isl --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld --with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-r14-7239-20240115095837-g8a1927856a1-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.1 20240115 (experimental) (GCC)