https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112487
Bug ID: 112487 Summary: GCC: 14: internal compiler error: in setup_one_parameter, at tree-inline.cc:3565 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- Compiler explorer: https://gcc.godbolt.org/z/fjErPvrvP When compile this program with `gcc-14 -O1`, gcc crashes: ``` struct A { char i; }; struct B { struct C *p; struct A *q; }; struct C { struct B a[1]; }; struct T { struct U *ptr; }; volatile struct T v; void f1(volatile struct T v) { f2(v); } void f2(volatile struct T *const v) { } void bar() { struct U *ptr; f1(v); } ``` The crash output pasted from compiler explorer: ``` <source>: In function 'f1': <source>:10:32: warning: implicit declaration of function 'f2'; did you mean 'f1'? [-Wimplicit-function-declaration] 10 | void f1(volatile struct T v) { f2(v); } | ^~ | f1 <source>: At top level: <source>:11:6: warning: conflicting types for 'f2'; have 'void(volatile struct T * const)' 11 | void f2(volatile struct T *const v) { } | ^~ <source>:10:32: note: previous implicit declaration of 'f2' with type 'void(volatile struct T * const)' 10 | void f1(volatile struct T v) { f2(v); } | ^~ during IPA pass: inline <source>: In function 'f1': <source>:10:32: internal compiler error: in setup_one_parameter, at tree-inline.cc:3565 10 | void f1(volatile struct T v) { f2(v); } | ^~~~~ 0x238b15e internal_error(char const*, ...) ???:0 0xa11270 fancy_abort(char const*, int, char const*) ???:0 0x11c5051 optimize_inline_calls(tree_node*) ???:0 0xe69aeb inline_transform(cgraph_node*) ???:0 0xfec7fb execute_all_ipa_transforms(bool) ???:0 0xbfe2d9 cgraph_node::expand() ???:0 0xc027bb 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. ```