https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126341
Bug ID: 126341
Summary: [17 Regression] ICE: in set_rtl, at cfgexpand.cc:181
with -fnon-call-exceptions -ftree-coalesce-vars
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Created attachment 65104
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65104&action=edit
reduced testcase
Compiler output:
$ x86_64-pc-linux-gnu-gcc -fnon-call-exceptions -ftree-coalesce-vars testcase.c
testcase.c: In function 'foo':
testcase.c:2:17: warning: division by zero [-Wdiv-by-zero]
2 | #define DIV0 (1 / 0)
| ^
testcase.c:17:72: note: in expansion of macro 'DIV0'
17 | int ah, ai, aj = 1, ak, al = 1, am = 1, an = 1, ao = 1, ap = 1, aq =
DIV0;
|
^~~~
testcase.c:2:17: warning: division by zero [-Wdiv-by-zero]
2 | #define DIV0 (1 / 0)
| ^
testcase.c:18:32: note: in expansion of macro 'DIV0'
18 | int ar = 1, as = 1, at, au = DIV0;
| ^~~~
during RTL pass: expand
testcase.c:15:1: internal compiler error: in set_rtl, at cfgexpand.cc:181
15 | foo (_BitInt (8) t)
| ^~~
0x2e644fd internal_error(char const*, ...)
/repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
0xe481c5 fancy_abort(char const*, int, char const*)
/repo/gcc-trunk/gcc/diagnostics/context.cc:1813
0x7b27b9 set_rtl
/repo/gcc-trunk/gcc/cfgexpand.cc:181
0x103680b adjust_one_expanded_partition_var
/repo/gcc-trunk/gcc/cfgexpand.cc:1900
0x103680b execute
/repo/gcc-trunk/gcc/cfgexpand.cc:7170
/repo/gcc-trunk/binary-trunk-20260721021643-g27fe5777991-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/17.0.0/cc1
-quiet -iprefix
/repo/gcc-trunk/binary-trunk-20260721021643-g27fe5777991-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../lib/gcc/x86_64-pc-linux-gnu/17.0.0/
testcase.c -quiet -dumpdir a- -dumpbase testcase.c -dumpbase-ext .c
-mtune=generic -march=x86-64 -fnon-call-exceptions -ftree-coalesce-vars -o
/tmp/ccU5O17y.s
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.
$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-20260721021643-g27fe5777991-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/17.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --enable-libsanitizer
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-20260721021643-g27fe5777991-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 17.0.0 20260721 (experimental) (GCC)