Bug 117756 - [12/13/14/15 Regression] ICE: in analyze_functions, at cgraphunit.cc:1404
Summary: [12/13/14/15 Regression] ICE: in analyze_functions, at cgraphunit.cc:1404
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 15.0
: P4 normal
Target Milestone: 12.5
Assignee: Not yet assigned to anyone
URL:
Keywords: error-recovery, ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2024-11-23 10:15 UTC by Xieym
Modified: 2024-11-25 07:28 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work: 4.9.4
Known to fail: 5.1.0
Last reconfirmed: 2024-11-23 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xieym 2024-11-23 10:15:07 UTC
$ cat 20241123025220_9.c
typedef void ( * fnt ) ( void ) ;
void __attribute__ ( noinline ) bar ( void ) {
extern inline void __attribute__ ( ( gnu_inline ) ) check3 ( void )
{
bar ( ) ;
}
void test ( void )
{
const fnt pcheck3 = check3 ;
pcheck3 ( ) ;
}
int main ( ) { return 0 ; }
$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=/data/xieym/exp/gcc/test_data/gcc-latest-install/bin/gcc
COLLECT_LTO_WRAPPER=/data/xieym/exp/gcc/test_data/gcc-latest-install/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /data/xieym/exp/gcc/test_data/gcc-latest-src/configure --enable-coverage --enable-checking --disable-multilib --disable-shared --disable-bootstrap --enable-languages=c,c++
--prefix=/data/xieym/exp/gcc/test_data/gcc-latest-install
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.0.0 20241123 (experimental) (GCC)
$ gcc-trunk -x c -std=c2x -c 20241123025220_9.c -o /dev/null
20241123025220_9.c:2:22: error: expected ‘(’ before ‘noinline’
    2 | void __attribute__ ( noinline ) bar ( void ) {
      |                      ^~~~~~~~
      |                      (
20241123025220_9.c: In function ‘bar’:
20241123025220_9.c:3:53: error: nested function ‘check3’ declared ‘extern’
    3 | extern inline void __attribute__ ( ( gnu_inline ) ) check3 ( void )
      |                                                     ^~~~~~
20241123025220_9.c:12:1: error: expected declaration or statement at end of input
   12 | int main ( ) { return 0 ; }
      | ^~~
At top level:
cc1: internal compiler error: in analyze_functions, at cgraphunit.cc:1404
0x567214e internal_error(char const*, ...)
        /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/diagnostic-global-context.cc:517
0x56126d8 fancy_abort(char const*, int, char const*)
        /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/diagnostic.cc:1696
0x1340f33 analyze_functions
        /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/cgraphunit.cc:1404
0x134639f symbol_table::finalize_compilation_unit()
        /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/cgraphunit.cc:2560
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.
Comment 1 Andrew Pinski 2024-11-23 15:17:49 UTC
Confirmed.