https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98195
Bug ID: 98195 Summary: [11 Regression] internal compiler error: Segmentation fault Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: anbu1024.me at gmail dot com Target Milestone: --- $ cat test.c static _Atomic long double x ; void foo ( void ) { int a , b , c ; x += foo ( x , a , b , c ) ; } -------------------------------------------------------------------------------- $ gcc-11 --version gcc (GCC) 11.0.0 20201129 (experimental) Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -------------------------------------------------------------------------------- $ gcc-11 test.c test.c: In function ‘foo’: test.c:8:14: error: too many arguments to function ‘foo’ 8 | x += foo ( x , a , b , c ) ; | ^~~ test.c:4:6: note: declared here 4 | void foo ( void ) { | ^~~ test.c:8:9: error: void value not ignored as it ought to be 8 | x += foo ( x , a , b , c ) ; | ^ test.c:8:11: internal compiler error: Segmentation fault 8 | x += foo ( x , a , b , c ) ; | ^~ 0xdeeb4f crash_signal ../../gcc-11-20201129/gcc/toplev.c:330 0xb5c982 gimplify_target_expr ../../gcc-11-20201129/gcc/gimplify.c:6757 0xb51e2e gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc-11-20201129/gcc/gimplify.c:14406 0xb55396 gimplify_stmt(tree_node**, gimple**) ../../gcc-11-20201129/gcc/gimplify.c:6862 0xb52f0b gimplify_statement_list ../../gcc-11-20201129/gcc/gimplify.c:1869 0xb52f0b gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc-11-20201129/gcc/gimplify.c:14454 0xb67dd7 gimplify_stmt(tree_node**, gimple**) ../../gcc-11-20201129/gcc/gimplify.c:6862 0xb67dd7 gimplify_compound_expr ../../gcc-11-20201129/gcc/gimplify.c:6062 0xb52141 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc-11-20201129/gcc/gimplify.c:14000 0xb55396 gimplify_stmt(tree_node**, gimple**) ../../gcc-11-20201129/gcc/gimplify.c:6862 0xb52f0b gimplify_statement_list ../../gcc-11-20201129/gcc/gimplify.c:1869 0xb52f0b gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc-11-20201129/gcc/gimplify.c:14454 0xb55396 gimplify_stmt(tree_node**, gimple**) ../../gcc-11-20201129/gcc/gimplify.c:6862 0xb5605d gimplify_bind_expr ../../gcc-11-20201129/gcc/gimplify.c:1417 0xb52121 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc-11-20201129/gcc/gimplify.c:14211 0xb6af39 gimplify_stmt(tree_node**, gimple**) ../../gcc-11-20201129/gcc/gimplify.c:6862 0xb6af39 gimplify_body(tree_node*, bool) ../../gcc-11-20201129/gcc/gimplify.c:15246 0xb6b35d gimplify_function_tree(tree_node*) ../../gcc-11-20201129/gcc/gimplify.c:15400 0x9af937 cgraph_node::analyze() ../../gcc-11-20201129/gcc/cgraphunit.c:670 0x9b2417 analyze_functions ../../gcc-11-20201129/gcc/cgraphunit.c:1235 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. -------------------------------------------------------------------------------- $ gcc-10 --version gcc (GCC) 10.2.1 20201128 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -------------------------------------------------------------------------------- $ gcc-10 test.c test.c: In function ‘foo’: test.c:8:7: error: too many arguments to function ‘foo’ 8 | x += foo ( x , a , b , c ) ; | ^~~ test.c:4:6: note: declared here 4 | void foo ( void ) { | ^~~ test.c:8:2: error: void value not ignored as it ought to be 8 | x += foo ( x , a , b , c ) ; | ^ test.c:8: confused by earlier errors, bailing out