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

            Bug ID: 106001
           Summary: [12 Regression] ICE: nexpected expression
                    'static_cast<char>(1)' of kind static_cast_expr
           Product: gcc
           Version: 12.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

seen with the gcc-12 branch 20220616 on x86_64-linux-gnu, building the spoa
package:

$ cat simd_alignment_engine_dispatch.ii
template <int> void _mmxxx_prefix_max() {
  char simde__tmp_a__0 =
      __builtin_shufflevector(simde__tmp_a__0, 0, static_cast<char>(1))

$ LANG=C g++ -c -msse2 -O0 -std=c++11 simd_alignment_engine_dispatch.ii
simd_alignment_engine_dispatch.ii: In function 'void _mmxxx_prefix_max()':
simd_alignment_engine_dispatch.ii:3:71: internal compiler error: unexpected
expression 'static_cast<char>(1)' of kind static_cast_expr
    3 |       __builtin_shufflevector(simde__tmp_a__0, 0, static_cast<char>(1))
      |                                                                       ^
0x6d9b71 cxx_eval_constant_expression
        ../../src/gcc/cp/constexpr.cc:7587
0x6d9ec0 cxx_eval_outermost_constant_expr
        ../../src/gcc/cp/constexpr.cc:7824
0x6dd267 maybe_constant_value(tree_node*, tree_node*, bool)
        ../../src/gcc/cp/constexpr.cc:8103
0x867381 build_x_shufflevector(unsigned int, vec<tree_node*, va_gc, vl_embed>*,
int)
        ../../src/gcc/cp/typeck.cc:6337
0x7cf33e cp_parser_postfix_expression
        ../../src/gcc/cp/parser.cc:7496
0x7b8096 cp_parser_binary_expression
        ../../src/gcc/cp/parser.cc:10035
0x7b889e cp_parser_assignment_expression
        ../../src/gcc/cp/parser.cc:10339
0x7ba3c9 cp_parser_constant_expression
        ../../src/gcc/cp/parser.cc:10642
0x7ba461 cp_parser_initializer_clause
        ../../src/gcc/cp/parser.cc:25223
0x7bd44c cp_parser_initializer
        ../../src/gcc/cp/parser.cc:25163
0x7eaf5f cp_parser_init_declarator
        ../../src/gcc/cp/parser.cc:22773
0x7c73b8 cp_parser_simple_declaration
        ../../src/gcc/cp/parser.cc:15280
0x7c8fe0 cp_parser_declaration_statement
        ../../src/gcc/cp/parser.cc:14361
0x7c97cc cp_parser_statement
        ../../src/gcc/cp/parser.cc:12446
0x7ca6ed cp_parser_statement_seq_opt
        ../../src/gcc/cp/parser.cc:12850
0x7ca79f cp_parser_compound_statement
        ../../src/gcc/cp/parser.cc:12802
0x7e91c3 cp_parser_function_body
        ../../src/gcc/cp/parser.cc:25069
0x7e91c3 cp_parser_ctor_initializer_opt_and_function_body
        ../../src/gcc/cp/parser.cc:25120
0x7ea30e cp_parser_function_definition_after_declarator
        ../../src/gcc/cp/parser.cc:31252
0x7eb376 cp_parser_function_definition_from_specifiers_and_declarator
        ../../src/gcc/cp/parser.cc:31168
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.


// Target: x86_64-linux-gnu
// Configured with: ../src/configure -v --with-pkgversion='Debian 12.1.0-4'
--with-bugurl=file:/
//usr/share/doc/gcc-12/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --p
refix=/usr --with-gcc-major-version-only --program-suffix=-12
--program-prefix=x86_64-linux-gnu-
 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib
--without-included-gettext --ena
ble-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu
--enable-libstdcxx-debug -
-enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new
--enable-gnu-unique-object --disable
-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib
--enable-libphobos-checki
ng=release --with-target-system-zlib=auto --enable-objc-gc=auto
--enable-multiarch --disable-wer
ror --enable-cet --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-m
ultilib --with-tune=generic
--enable-offload-targets=nvptx-none=/build/gcc-12-8ErGg2/gcc-12-12.1
.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-12-8ErGg2/gcc-12-12.1.0/debian/tmp-gcn/usr
--en
able-offload-defaulted --without-cuda-driver --enable-checking=release
--build=x86_64-linux-gnu 
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
// Thread model: posix
// Supported LTO compression algorithms: zlib zstd
// gcc version 12.1.0 (Debian 12.1.0-4)

Reply via email to