https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93572
--- Comment #1 from Yongheng Chen <changochen1 at gmail dot com> ---
Stack dump:
---
tt.c:3:4: error: expected ‘;’, identifier or ‘(’ before ‘short’
3 | } short main ( ) { int x ;
| ^~~~~
tt.c: In function ‘h’:
tt.c:5:14: warning: comparison between pointer and integer
5 | int v [ & q != 2 ] ;
| ^~
tt.c:6:2: error: expected declaration specifiers before numeric constant
6 | 2 * ( 3 + 4 ) ;
| ^
tt.c:7:2: error: expected declaration specifiers before ‘x’
7 | x = x & ( 6 / ( 6 / 114 / 2 ) / 2 ) ;
| ^
tt.c:8:2: error: expected declaration specifiers before ‘return’
8 | return x - 1 ;
| ^~~~~~
tt.c:9:2: error: expected declaration specifiers before ‘}’ token
9 | }
| ^
tt.c:4:6: warning: type of ‘x’ defaults to ‘int’ [-Wimplicit-int]
4 | int h ( x , y ) char arr [ ( 1 , 2 ) - ( ( 1 , 2 ) / 2 ) * 2 ] [
sizeof 0 ] , ( * p ) [ ] , * q ;
| ^
tt.c:4:6: warning: type of ‘y’ defaults to ‘int’ [-Wimplicit-int]
tt.c:5:6: error: declaration for parameter ‘v’ but no such parameter
5 | int v [ & q != 2 ] ;
| ^
tt.c:4:96: error: declaration for parameter ‘q’ but no such parameter
4 | int h ( x , y ) char arr [ ( 1 , 2 ) - ( ( 1 , 2 ) / 2 ) * 2 ] [
sizeof 0 ] , ( * p ) [ ] , * q ;
|
^
tt.c:4:84: error: declaration for parameter ‘p’ but no such parameter
4 | int h ( x , y ) char arr [ ( 1 , 2 ) - ( ( 1 , 2 ) / 2 ) * 2 ] [
sizeof 0 ] , ( * p ) [ ] , * q ;
|
^
tt.c:4:23: error: declaration for parameter ‘arr’ but no such parameter
4 | int h ( x , y ) char arr [ ( 1 , 2 ) - ( ( 1 , 2 ) / 2 ) * 2 ] [
sizeof 0 ] , ( * p ) [ ] , * q ;
| ^~~
tt.c:9: error: expected ‘{’ at end of input
9 | }
|
tt.c: In function ‘main’:
tt.c:9:2: error: expected declaration or statement at end of input
9 | }
| ^
tt.c:3:10: internal compiler error: q from h referenced in main
3 | } short main ( ) { int x ;
| ^~~~
0xe74559 convert_nonlocal_reference_op
../../gcc/tree-nested.c:1063
0x108af7a 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*> >*))
../../gcc/tree.c:11954
0xe742ed convert_nonlocal_reference_op
../../gcc/tree-nested.c:1105
0x108af7a 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*> >*))
../../gcc/tree.c:11954
0xb11f20 walk_gimple_op(gimple*, tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
../../gcc/gimple-walk.c:202
0xb1230c walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
../../gcc/gimple-walk.c:596
0xb124a0 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
../../gcc/gimple-walk.c:51
0xb12391 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
../../gcc/gimple-walk.c:686
0xb124a0 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
../../gcc/gimple-walk.c:51
0xe6fc94 walk_body
../../gcc/tree-nested.c:713
0xe6fc94 walk_function
../../gcc/tree-nested.c:724
0xe6fc94 walk_all_functions
../../gcc/tree-nested.c:789
0xe76008 lower_nested_functions(tree_node*)
../../gcc/tree-nested.c:3528
0x98c4dc cgraph_node::analyze()
../../gcc/cgraphunit.c:675
0x98f19f analyze_functions
../../gcc/cgraphunit.c:1210
0x98fd62 symbol_table::finalize_compilation_unit()
../../gcc/cgraphunit.c:2956
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
---