https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117145
Bug ID: 117145 Summary: ICE: in make_ssa_name_fn, at tree-ssanames.cc:355 at -O1 and above with vector_size Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: iamanonymous.cs at gmail dot com Target Milestone: --- ******************************************************************************* OS and Platform: $ uname -a: Linux 65dac7c84719 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux ******************************************************************************* gcc version: Using built-in specs. COLLECT_GCC=/home/software/gcc-trunk-3aa004f/bin/gcc COLLECT_LTO_WRAPPER=/home/software/gcc-trunk-3aa004f/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc/configure --disable-multilib --disable-bootstrap --enable-languages=c,c++ --prefix=/home/software/gcc-trunk-3aa004f --enable-coverage Thread model: posix Supported LTO compression algorithms: zlib gcc version 15.0.0 20240630 (experimental) (GCC) ******************************************************************************* Program: $ cat mutant.c int a; void b(); int e(int *c, struct d{__attribute__((vector_size(4))) char an[*c]} *) { sizeof(struct d); } void f() { if (e(&a, 0)) b(); } ******************************************************************************* Command Lines: $ gcc -O1 mutant.c mutant.c:3:67: warning: no semicolon at end of struct or union 3 | int e(int *c, struct d{__attribute__((vector_size(4))) char an[*c]} *) { | ^ mutant.c:3:22: warning: 'struct d' declared inside parameter list will not be visible outside of this definition or declaration 3 | int e(int *c, struct d{__attribute__((vector_size(4))) char an[*c]} *) { | ^ during IPA pass: inline In function 'e': cc1: internal compiler error: in make_ssa_name_fn, at tree-ssanames.cc:355 0x5071bcf diagnostic_context::report_diagnostic(diagnostic_info*) ???:0 0x50724a1 diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x50924c7 internal_error(char const*, ...) ???:0 0x50729e4 fancy_abort(char const*, int, char const*) ???:0 0x2499c77 make_ssa_name_fn(function*, tree_node*, gimple*, unsigned int) ???:0 0x11a4332 make_ssa_name(tree_node*, gimple*) ???:0 0x202beeb copy_tree_body_r(tree_node**, int*, void*) ???:0 0x2697510 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*)) ???:0 0x2699036 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*)) ???:0 0x2028ab8 remap_type(tree_node*, copy_body_data*) ???:0 0x20244c2 remap_decl(tree_node*, copy_body_data*) ???:0 0x2028ab8 remap_type(tree_node*, copy_body_data*) ???:0 0x2028ab8 remap_type(tree_node*, copy_body_data*) ???:0 0x20244c2 remap_decl(tree_node*, copy_body_data*) ???:0 0x204a890 tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, ipa_param_adjustments*, bool, bitmap_head*, basic_block_def*) ???:0 0x187c46c inline_transform(cgraph_node*) ???:0 0x1c23e63 execute_all_ipa_transforms(bool) ???:0 0x12524ae cgraph_node::expand() ???:0 0x12549cc symbol_table::compile() ???:0 0x1255373 symbol_table::finalize_compilation_unit() ???:0 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. It can be compiled normally without vector_size attribute. Also ICE on trunk. Compiler Explorer: https://godbolt.org/z/T6bP3vzae