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

            Bug ID: 113637
           Summary: ICE: in as_a, at machmode.h:381 with extern function
                    declaration and _BitInt() used as VLA size
           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
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Created attachment 57244
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57244&action=edit
reduced testcase (from gcc.dg/Wvla-parameter-4.c)

Compiler output:
$ x86_64-pc-linux-gnu-gcc testcase.c -g
testcase.c: In function 'foo':
testcase.c:5:1: internal compiler error: in as_a, at machmode.h:381
    5 | }
      | ^
0x7418a8 scalar_int_mode as_a<scalar_int_mode>(machine_mode)
        /repo/gcc-trunk/gcc/machmode.h:381
0x748787 scalar_int_mode as_a<scalar_int_mode>(machine_mode)
        /repo/gcc-trunk/gcc/tree.h:3813
0x748787 loc_list_from_tree_1
        /repo/gcc-trunk/gcc/dwarf2out.cc:19030
0x1058d7b loc_list_from_tree_1
        /repo/gcc-trunk/gcc/dwarf2out.cc:19443
0x1066138 loc_list_from_tree
        /repo/gcc-trunk/gcc/dwarf2out.cc:19737
0x1066138 add_scalar_info
        /repo/gcc-trunk/gcc/dwarf2out.cc:21528
0x10671e1 add_subscript_info
        /repo/gcc-trunk/gcc/dwarf2out.cc:21767
0x1053f12 gen_array_type_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:22641
0x1053f12 gen_type_die_with_usage
        /repo/gcc-trunk/gcc/dwarf2out.cc:26433
0x10557fd gen_type_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:26496
0x10557fd modified_type_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:13924
0x1055dc5 modified_type_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:14068
0x10577a6 add_type_attribute
        /repo/gcc-trunk/gcc/dwarf2out.cc:22387
0x1068fc1 gen_formal_parameter_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:23096
0x10693ce gen_formal_types_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:23191
0x104ce8b gen_subprogram_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:24063
0x10508ca gen_decl_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:27113
0x106e6cf decls_for_scope
        /repo/gcc-trunk/gcc/dwarf2out.cc:26676
0x104beee gen_subprogram_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:24174
0x10508ca gen_decl_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:27113
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-8474-20240128132141-g46df13697a4-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-8474-20240128132141-g46df13697a4-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240128 (experimental) (GCC)

Reply via email to