https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105250
Bug ID: 105250 Summary: ICE: in fold_convert_loc, at fold-const.cc:2581 with conflicting function redeclaration Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz CC: marxin at gcc dot gnu.org Target Milestone: --- Host: x86_64-pc-linux-gnu Created attachment 52792 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52792&action=edit reduced testcase The testcase is broken in a similar way as PR105140 Compiler output: $ x86_64-pc-linux-gnu-gcc -O2 testcase.c testcase.c:9:1: warning: return type defaults to 'int' [-Wimplicit-int] 9 | foo(int, int, int, int, U, U, V, V, W, W, int, | ^~~ testcase.c:9:1: warning: conflicting types for 'foo' testcase.c:7:6: note: previous declaration of 'foo' with type 'void()' 7 | void foo(); | ^~~ testcase.c: In function 'foo': testcase.c:9:1: note: the ABI for passing parameters with 32-byte alignment has changed in GCC 4.6 9 | foo(int, int, int, int, U, U, V, V, W, W, int, | ^~~ during IPA pass: inline testcase.c:16:3: internal compiler error: in fold_convert_loc, at fold-const.cc:2581 16 | foo(0, 0, 0, 0, (U){}, (U){}, (V){}, (V){}, (W){}, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 17 | (W){}, 2, (T){}, 0, 0, 0, 0, (U){}, (U){}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 18 | (V){}, (V){}, (W){}, (W){}, (T){}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 19 | (T){}, 0, 0, 0, 0, (U){}, (U){}, (V){}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 20 | (V){}, (W){}, (W){}, (T){}, (T){}, 0, 0, 0, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 21 | 0, 0, 0, (T){}, | ~~~~~~~~~~~~~~~ 22 | (T){}, (W){}, | ~~~~~~~~~~~~~ 23 | (W){}, (T){}, (T){}, 0, 0, 0, 0, 0, 0, (W){}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 24 | (V){}, (W){}, (T){}, 0, 0, (U){}, (F){}); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0x6db3be fold_convert_loc(unsigned int, tree_node*, tree_node*) /repo/gcc-trunk/gcc/fold-const.cc:2581 0x1415210 setup_one_parameter /repo/gcc-trunk/gcc/tree-inline.cc:3549 0x142031a initialize_inlined_parameters /repo/gcc-trunk/gcc/tree-inline.cc:3642 0x142031a expand_call_inline /repo/gcc-trunk/gcc/tree-inline.cc:5017 0x14229c6 gimple_expand_calls_inline /repo/gcc-trunk/gcc/tree-inline.cc:5320 0x14229c6 optimize_inline_calls(tree_node*) /repo/gcc-trunk/gcc/tree-inline.cc:5492 0x110d0cb inline_transform(cgraph_node*) /repo/gcc-trunk/gcc/ipa-inline-transform.cc:790 0x1289f16 execute_one_ipa_transform_pass /repo/gcc-trunk/gcc/passes.cc:2330 0x1289f16 execute_all_ipa_transforms(bool) /repo/gcc-trunk/gcc/passes.cc:2393 0xeb520d cgraph_node::expand() /repo/gcc-trunk/gcc/cgraphunit.cc:1828 0xeb520d cgraph_node::expand() /repo/gcc-trunk/gcc/cgraphunit.cc:1788 0xeb6806 expand_all_functions /repo/gcc-trunk/gcc/cgraphunit.cc:1999 0xeb6806 symbol_table::compile() /repo/gcc-trunk/gcc/cgraphunit.cc:2349 0xeb93e7 symbol_table::compile() /repo/gcc-trunk/gcc/cgraphunit.cc:2262 0xeb93e7 symbol_table::finalize_compilation_unit() /repo/gcc-trunk/gcc/cgraphunit.cc:2530 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.