https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123018
Bug ID: 123018
Summary: ICE: tree check: expected none of vector_type, have
vector_type in finish_struct, at c/c-decl.cc
Product: gcc
Version: 15.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: 522024330006 at smail dot nju.edu.cn
Target Milestone: ---
I find this ICE on the 14.1 and later.
Compiler Explorer: https://godbolt.org/z/MM1xrdaoe
Reduced program:
```c
struct S {
int x:8 __attribute__((vector_size(8)));
};
```
Part of traceback:
internal compiler error: tree check: expected none of vector_type, have
vector_type in finish_struct, at c/c-decl.cc:9727
70 | } data_set [sizeof(dbl_cval)] ={&_Complex_I,[], {}, {}};
| ^
0x569ce3c internal_error(char const*, ...)
/workspace/install/gcc/src/gcc/gcc/diagnostic-global-context.cc:517
0x2856553 tree_not_check_failed(tree_node const*, char const*, int, char
const*, ...)
/workspace/install/gcc/src/gcc/gcc/tree.cc:9151
0xe72642 tree_not_check(tree_node*, char const*, int, char const*, tree_code)
/workspace/install/gcc/src/gcc/gcc/tree.h:3701
0xe42968 finish_struct(unsigned long, tree_node*, tree_node*, tree_node*,
c_struct_parse_info*, tree_node**)
/workspace/install/gcc/src/gcc/gcc/c/c-decl.cc:9727
0xf34969 c_parser_struct_or_union_specifier
/workspace/install/gcc/src/gcc/gcc/c/c-parser.cc:4388
0xf311ad c_parser_declspecs(c_parser*, c_declspecs*, bool, bool, bool, bool,
bool, bool, bool, c_lookahead_kind)
/workspace/install/gcc/src/gcc/gcc/c/c-parser.cc:3760
0xf2a775 c_parser_declaration_or_fndef
/workspace/install/gcc/src/gcc/gcc/c/c-parser.cc:2460
0xf450ae c_parser_compound_statement_nostart
/workspace/install/gcc/src/gcc/gcc/c/c-parser.cc:7685
0xf414a3 c_parser_compound_statement
/workspace/install/gcc/src/gcc/gcc/c/c-parser.cc:7018
0xf2ead7 c_parser_declaration_or_fndef
/workspace/install/gcc/src/gcc/gcc/c/c-parser.cc:3218
0xf29809 c_parser_external_declaration
/workspace/install/gcc/src/gcc/gcc/c/c-parser.cc:2150
0xf28c9b c_parser_translation_unit
/workspace/install/gcc/src/gcc/gcc/c/c-parser.cc:2004
0xfd4dac c_parse_file()
/workspace/install/gcc/src/gcc/gcc/c/c-parser.cc:29833
0x1106e32 c_common_parse_file()
/workspace/install/gcc/src/gcc/gcc/c-family/c-opts.cc:1381
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.
The gcc version I used is:
Using built-in specs.
COLLECT_GCC=/workspace/install/gcc/install_15.2.0/bin/gcc
COLLECT_LTO_WRAPPER=/workspace/install/gcc/install_15.2.0/libexec/gcc/x86_64-pc-linux-gnu/15.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /workspace/install/gcc/src/gcc/configure --enable-coverage
--enable-checking --disable-multilib --disable-shared --disable-bootstrap
--enable-languages=c,c++ --prefix=/workspace/install/gcc/install_15.2.0
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.2.0 (GCC)