https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105998
Bug ID: 105998 Summary: [10/11/12/13 Regression] ICE: in as_a, at machmode.h:365 with vector arithmetics Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Created attachment 53151 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53151&action=edit reduced testcase Compiler output: $ x86_64-pc-linux-gnu-g++ testcase.C testcase.C: In function 'void foo()': testcase.C:8:44: internal compiler error: in as_a, at machmode.h:365 8 | long l = (long) ((0 | v) - ((V) { } == 0)); | ^ 0x90395f scalar_int_mode as_a<scalar_int_mode>(machine_mode) /repo/gcc-trunk/gcc/machmode.h:365 0x904edf scalar_int_mode as_a<scalar_int_mode>(machine_mode) /repo/gcc-trunk/gcc/tree.h:3630 0x904edf narrowing_initializer_constant_valid_p /repo/gcc-trunk/gcc/varasm.cc:4720 0x19d616e initializer_constant_valid_p_1 /repo/gcc-trunk/gcc/varasm.cc:5022 0x19d70b1 initializer_constant_valid_p(tree_node*, tree_node*, bool) /repo/gcc-trunk/gcc/varasm.cc:5054 0xe493be reduced_constant_expression_p(tree_node*) /repo/gcc-trunk/gcc/cp/constexpr.cc:3100 0x109a807 store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, int) /repo/gcc-trunk/gcc/cp/typeck2.cc:935 0xe9f6c7 check_initializer /repo/gcc-trunk/gcc/cp/decl.cc:7454 0xec5d41 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) /repo/gcc-trunk/gcc/cp/decl.cc:8439 0xfb7a5c cp_parser_init_declarator /repo/gcc-trunk/gcc/cp/parser.cc:22899 0xf914a3 cp_parser_simple_declaration /repo/gcc-trunk/gcc/cp/parser.cc:15315 0xf931ad cp_parser_declaration_statement /repo/gcc-trunk/gcc/cp/parser.cc:14394 0xf93a01 cp_parser_statement /repo/gcc-trunk/gcc/cp/parser.cc:12471 0xf9491d cp_parser_statement_seq_opt /repo/gcc-trunk/gcc/cp/parser.cc:12883 0xf949f8 cp_parser_compound_statement /repo/gcc-trunk/gcc/cp/parser.cc:12835 0xfb4f35 cp_parser_function_body /repo/gcc-trunk/gcc/cp/parser.cc:25184 0xfb4f35 cp_parser_ctor_initializer_opt_and_function_body /repo/gcc-trunk/gcc/cp/parser.cc:25235 0xfb6ada cp_parser_function_definition_after_declarator /repo/gcc-trunk/gcc/cp/parser.cc:31362 0xfb8060 cp_parser_function_definition_from_specifiers_and_declarator /repo/gcc-trunk/gcc/cp/parser.cc:31279 0xfb8060 cp_parser_init_declarator /repo/gcc-trunk/gcc/cp/parser.cc:22637 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-g++ -v Using built-in specs. COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-g++ COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r13-1114-20220615202152-gdc9b92facf8-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/13.0.0/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-r13-1114-20220615202152-gdc9b92facf8-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 13.0.0 20220615 (experimental) (GCC)