https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95145
Bug ID: 95145
Summary: [10/11 Regression]internal compiler error: in
analyze_functions, at cgraphunit.c:1380
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
void foo ( )
{
extern __inline int bar ( ) { }
int baz ( ) { return bar ; }
}
$ gcc-11 --version
gcc (GCC) 11.0.0 20200510 (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:4:22: error: nested function ‘bar’ declared ‘extern’
4 | extern __inline int bar ( ) { }
| ^~~
test.c: In function ‘baz’:
test.c:6:23: warning: returning ‘int (*)()’ from a function with return type
‘int’ makes integer from pointer without a cast
[]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion]8;;]
6 | int baz ( ) { return bar ; }
| ^~~
At top level:
cc1: internal compiler error: in analyze_functions, at cgraphunit.c:1380
0x63a1df analyze_functions
../../gcc-11-20200510/gcc/cgraphunit.c:1380
0x966712 symbol_table::finalize_compilation_unit()
../../gcc-11-20200510/gcc/cgraphunit.c:2971
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.0.1 20200419 (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-10 test.c
test.c: In function ‘foo’:
test.c:4:22: error: nested function ‘bar’ declared ‘extern’
4 | extern __inline int bar ( ) { }
| ^~~
test.c: In function ‘baz’:
test.c:6:23: warning: returning ‘int (*)()’ from a function with return type
‘int’ makes integer from pointer without a cast
[]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion]8;;]
6 | int baz ( ) { return bar ; }
| ^~~
At top level:
cc1: internal compiler error: in analyze_functions, at cgraphunit.c:1380
0x639ab1 analyze_functions
../../gcc-10-20200419/gcc/cgraphunit.c:1380
0x963fc2 symbol_table::finalize_compilation_unit()
../../gcc-10-20200419/gcc/cgraphunit.c:2974
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.