https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114014

            Bug ID: 114014
           Summary: ICE: 'verify_type' failed: 'TYPE_CANONICAL' is not
                    compatible with -gbtf or -gctf on gcc.dg/gnu23-tag-1.c
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: debug
          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

Created attachment 57471
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57471&action=edit
reduced, valid testcase (from gcc.dg/gnu23-tag-1.c)

Compiler output:
$ x86_64-pc-linux-gnu-gcc -std=gnu23 testcase.c -gbtf
testcase.c:8:1: error: 'TYPE_CANONICAL' is not compatible
    8 | };
      | ^
 <record_type 0x7f7c1e3b1690 r asm_written includes-flexarray BLK
...
    chain <type_decl 0x7f7c1e2317b8 D.2771>>
testcase.c:8:1: internal compiler error: 'verify_type' failed
0x185477e verify_type(tree_node const*)
        /repo/gcc-trunk/gcc/tree.cc:14394
0x1053f24 gen_type_die_with_usage
        /repo/gcc-trunk/gcc/dwarf2out.cc:26266
0x1050c38 gen_type_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:26497
0x1050c38 gen_decl_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:27137
0x1051f6b dwarf2out_decl
        /repo/gcc-trunk/gcc/dwarf2out.cc:27695
0x10521c8 dwarf2out_type_decl
        /repo/gcc-trunk/gcc/dwarf2out.cc:27413
0x10521c8 dwarf2out_type_decl
        /repo/gcc-trunk/gcc/dwarf2out.cc:27408
0x13d07c4 rest_of_type_compilation(tree_node*, int)
        /repo/gcc-trunk/gcc/passes.cc:339
0xe0e7e2 finish_struct(unsigned int, tree_node*, tree_node*, tree_node*,
c_struct_parse_info*, tree_node**)
        /repo/gcc-trunk/gcc/c/c-decl.cc:9733
0xe6919d c_parser_struct_or_union_specifier
        /repo/gcc-trunk/gcc/c/c-parser.cc:4090
0xe6919d c_parser_declspecs(c_parser*, c_declspecs*, bool, bool, bool, bool,
bool, bool, bool, c_lookahead_kind)
        /repo/gcc-trunk/gcc/c/c-parser.cc:3494
0xe7871c c_parser_declaration_or_fndef
        /repo/gcc-trunk/gcc/c/c-parser.cc:2306
0xe848eb c_parser_external_declaration
        /repo/gcc-trunk/gcc/c/c-parser.cc:2046
0xe852d5 c_parser_translation_unit
        /repo/gcc-trunk/gcc/c/c-parser.cc:1900
0xe852d5 c_parse_file()
        /repo/gcc-trunk/gcc/c/c-parser.cc:26816
0xefcaf1 c_common_parse_file()
        /repo/gcc-trunk/gcc/c-family/c-opts.cc:1311
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 -std=gnu23 testcase.c -gctf
testcase.c:8:1: error: 'TYPE_CANONICAL' is not compatible
    8 | };
      | ^
 <record_type 0x7f142ffb1690 r asm_written includes-flexarray BLK

$ 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-9077-20240220001758-g52490278466-checking-yes-rtl-df-extra-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
--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-9077-20240220001758-g52490278466-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240220 (experimental) (GCC)

Reply via email to