https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117212
Bug ID: 117212
Summary: ICE: in gimplify_var_or_parm_decl, at gimplify.cc:3059
Product: gcc
Version: 12.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: bic60176 at gmail dot com
Target Milestone: ---
Created attachment 59386
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59386&action=edit
testcase
Compiler Explorer: https://godbolt.org/z/GnsYP86Kb
Console:
<source>:2:23: warning: 'struct foo' declared inside parameter list will not be
visible outside of this definition or declaration
2 | int bar(int n, struct foo* x)
| ^~~
<source>: In function 'bar':
<source>:6:9: warning: implicit declaration of function 'printf'
[-Wimplicit-function-declaration]
6 | printf("n in bar(): %d\n", n);
| ^~~~~~
<source>:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
+++ |+#include <stdio.h>
1 |
<source>:6:9: warning: incompatible implicit declaration of built-in function
'printf' [-Wbuiltin-declaration-mismatch]
6 | printf("n in bar(): %d\n", n);
| ^~~~~~
<source>:6:9: note: include '<stdio.h>' or provide a declaration of 'printf'
<source>:2:5: internal compiler error: in gimplify_var_or_parm_decl, at
gimplify.cc:3059
2 | int bar(int n, struct foo* x)
| ^~~
0x1b4baec internal_error(char const*, ...)
???:0
0x6ef6b5 fancy_abort(char const*, int, char const*)
???:0
0xa070b7 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xa08e35 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xa072c7 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xa072c7 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xa07200 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xa0cd0a gimplify_one_sizepos(tree_node**, gimple**)
???:0
0xf49203 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
0xf498eb 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
0xf4b21e walk_tree_without_duplicates_1(tree_node**, tree_node*
(*)(tree_node**, int*, void*), void*, tree_node* (*)(tree_node**, int*,
tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, false,
default_hash_traits<tree_node*> >*))
???:0
0x9a6d21 gimplify_parameters(gimple**)
???:0
0xa0ac41 gimplify_body(tree_node*, bool)
???:0
0xa0add6 gimplify_function_tree(tree_node*)
???:0
0x888b47 cgraph_node::analyze()
???:0
0x88be81 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.
Compiler returned: 1