Bug 106702 - [11 Regression] ICE with LTO: internal compiler error: tree code ‘c_maybe_const_expr’ is not supported in LTO streams
Summary: [11 Regression] ICE with LTO: internal compiler error: tree code ‘c_maybe_con...
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 11.3.0
: P3 normal
Target Milestone: 11.5
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2022-08-21 13:25 UTC by Martin Uecker
Modified: 2023-07-08 01:46 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work: 12.1.0
Known to fail: 11.1.0, 11.3.0, 11.4.0
Last reconfirmed: 2023-07-07 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Uecker 2022-08-21 13:25:02 UTC
I get this with 11.3.0 but not with 12.

https://godbolt.org/z/6Esa3jhh9


$ gcc-11 --version
gcc-11 (Debian 11.3.0-5) 11.3.0
Copyright (C) 2021 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.

$ cat test.c 

extern void bar(int M, int N, float S[(N > M) ? M : N]);

void foo(int M, int N)
{
	bar(M, N, 0);
}

$ gcc-11 -I ../src/  -flto test.c 
during IPA pass: modref
test.c:8:1: internal compiler error: tree code ‘c_maybe_const_expr’ is not supported in LTO streams
    8 | }
      | ^
0x7fa316e01209 __libc_start_call_main
	../sysdeps/nptl/libc_start_call_main.h:58
0x7fa316e012bb __libc_start_main_impl
	../csu/libc-start.c:389
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-11/README.Bugs> for instructions.
Comment 1 Andrew Pinski 2022-08-21 18:41:51 UTC
Confirmed. a Regression from GCC 10.
Comment 2 Martin Liška 2022-08-22 07:13:27 UTC
Fixed on master with r12-5347-g2c2148d8c144d738, and started with r11-3303-g6450f07388f9fe57.
Comment 3 Jakub Jelinek 2023-05-29 10:07:24 UTC
GCC 11.4 is being released, retargeting bugs to GCC 11.5.