https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117479
Bug ID: 117479
Summary: ICE on x86_64-linux-gnu: in
cxx_eval_constant_expression, at cp/constexpr.cc:8448
with vector_size
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: iamanonymous.cs at gmail dot com
Target Milestone: ---
Compiler Explorer: https://godbolt.org/z/W8v9x3bde
*******************************************************************************
gcc version:
Using built-in specs.
COLLECT_GCC=/home/software/gcc-trunk/bin/gcc
COLLECT_LTO_WRAPPER=/home/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --disable-bootstrap --enable-checking=yes
--prefix=/home/software/gcc-trunk --enable-sanitizers --enable-languages=c,c++
--disable-werror --enable-multilib --enable-coverage
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20241107 (experimental) (GCC)
*******************************************************************************
Program:
$ cat mutant.C
struct {
int a;
__attribute__((vector_size(4))) int c { a };
} constexpr b {
};
*******************************************************************************
Command Lines:
$ gcc mutant.C
mutant.C:5:1: internal compiler error: in cxx_eval_constant_expression, at
cp/constexpr.cc:8448
5 | }
| ^
0x5cdf4f4 internal_error(char const*, ...)
../../gcc/gcc/diagnostic-global-context.cc:518
0x5c807b6 fancy_abort(char const*, int, char const*)
../../gcc/gcc/diagnostic.cc:1696
0xf7d3b4 cxx_eval_constant_expression
../../gcc/gcc/cp/constexpr.cc:8448
0xf6a9c4 cxx_eval_indirect_ref
../../gcc/gcc/cp/constexpr.cc:5995
0xf78f14 cxx_eval_constant_expression
../../gcc/gcc/cp/constexpr.cc:7874
0xf60932 cxx_eval_component_reference
../../gcc/gcc/cp/constexpr.cc:4598
0xf79a0a cxx_eval_constant_expression
../../gcc/gcc/cp/constexpr.cc:8047
0xf65f51 cxx_eval_bare_aggregate
../../gcc/gcc/cp/constexpr.cc:5369
0xf79f46 cxx_eval_constant_expression
../../gcc/gcc/cp/constexpr.cc:8107
0xf65f51 cxx_eval_bare_aggregate
../../gcc/gcc/cp/constexpr.cc:5369
0xf79f46 cxx_eval_constant_expression
../../gcc/gcc/cp/constexpr.cc:8107
0xf8102a cxx_eval_outermost_constant_expr
../../gcc/gcc/cp/constexpr.cc:8880
0xf84107 maybe_constant_init_1
../../gcc/gcc/cp/constexpr.cc:9391
0xf84244 cxx_constant_init(tree_node*, tree_node*)
../../gcc/gcc/cp/constexpr.cc:9417
0x169a16b store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
../../gcc/gcc/cp/typeck2.cc:910
0x109512a check_initializer
../../gcc/gcc/cp/decl.cc:7880
0x10a122f cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int,
cp_decomp*)
../../gcc/gcc/cp/decl.cc:8933
0x1383414 cp_parser_init_declarator
../../gcc/gcc/cp/parser.cc:23919
0x1364c5a cp_parser_simple_declaration
../../gcc/gcc/cp/parser.cc:16165
0x1364376 cp_parser_block_declaration
../../gcc/gcc/cp/parser.cc:15984
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.