public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/112785] New: ICE: in duplicate_insn_chain, at cfgrtl.cc:4386 with -O1 -funroll-all-loops --param=max-unroll-times=100000 --param=max-average-unrolled-insns=1000000 --param=max-unrolled-insns=1000000
@ 2023-11-30 14:42 zsojka at seznam dot cz
2023-11-30 15:06 ` [Bug tree-optimization/112785] " rguenth at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: zsojka at seznam dot cz @ 2023-11-30 14:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112785
Bug ID: 112785
Summary: ICE: in duplicate_insn_chain, at cfgrtl.cc:4386 with
-O1 -funroll-all-loops --param=max-unroll-times=100000
--param=max-average-unrolled-insns=1000000
--param=max-unrolled-insns=1000000
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
CC: rguenth at gcc dot gnu.org
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Created attachment 56731
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56731&action=edit
reduced testcase
Compiler output:
$ x86_64-pc-linux-gnu-gcc -O1 -funroll-all-loops
--param=max-unroll-times=100000 --param=max-average-unrolled-insns=1000000
--param=max-unrolled-insns=1000000 testcase.C
during RTL pass: loop2_unroll
testcase.C: In function 'void foo()':
testcase.C:25:1: internal compiler error: in duplicate_insn_chain, at
cfgrtl.cc:4386
25 | }
| ^
0x807a7b duplicate_insn_chain(rtx_insn*, rtx_insn*, loop*, copy_bb_data*)
/repo/gcc-trunk/gcc/cfgrtl.cc:4386
0x128a37f cfg_layout_duplicate_bb
/repo/gcc-trunk/gcc/cfgrtl.cc:4474
0x126d3ca duplicate_block(basic_block_def*, edge_def*, basic_block_def*,
copy_bb_data*)
/repo/gcc-trunk/gcc/cfghooks.cc:1119
0x126db7e copy_bbs(basic_block_def**, unsigned int, basic_block_def**,
edge_def**, unsigned int, edge_def**, loop*, basic_block_def*, bool)
/repo/gcc-trunk/gcc/cfghooks.cc:1384
0x127b751 duplicate_loop_body_to_header_edge(loop*, edge_def*, unsigned int,
simple_bitmap_def*, edge_def*, vec<edge_def*, va_heap, vl_ptr>*, int)
/repo/gcc-trunk/gcc/cfgloopmanip.cc:1403
0x15c4f95 unroll_loop_stupid
/repo/gcc-trunk/gcc/loop-unroll.cc:1252
0x15c4f95 unroll_loops(int)
/repo/gcc-trunk/gcc/loop-unroll.cc:299
0x15b27cc execute
/repo/gcc-trunk/gcc/loop-init.cc:592
0x15b27cc execute
/repo/gcc-trunk/gcc/loop-init.cc:579
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.
(gdb) p cfun->last_clique
$1 = 0
It has probably wrapped to 0 from 65535
$ 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-r14-5986-20231129235555-g8315f998659-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.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
--with-cloog --with-ppl --with-isl --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 --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-5986-20231129235555-g8315f998659-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231130 (experimental) (GCC)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/112785] ICE: in duplicate_insn_chain, at cfgrtl.cc:4386 with -O1 -funroll-all-loops --param=max-unroll-times=100000 --param=max-average-unrolled-insns=1000000 --param=max-unrolled-insns=1000000
2023-11-30 14:42 [Bug tree-optimization/112785] New: ICE: in duplicate_insn_chain, at cfgrtl.cc:4386 with -O1 -funroll-all-loops --param=max-unroll-times=100000 --param=max-average-unrolled-insns=1000000 --param=max-unrolled-insns=1000000 zsojka at seznam dot cz
@ 2023-11-30 15:06 ` rguenth at gcc dot gnu.org
2023-12-04 14:34 ` cvs-commit at gcc dot gnu.org
2023-12-04 14:59 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-11-30 15:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112785
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0 |1
Last reconfirmed| |2023-11-30
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Thanks, I'll have a look.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/112785] ICE: in duplicate_insn_chain, at cfgrtl.cc:4386 with -O1 -funroll-all-loops --param=max-unroll-times=100000 --param=max-average-unrolled-insns=1000000 --param=max-unrolled-insns=1000000
2023-11-30 14:42 [Bug tree-optimization/112785] New: ICE: in duplicate_insn_chain, at cfgrtl.cc:4386 with -O1 -funroll-all-loops --param=max-unroll-times=100000 --param=max-average-unrolled-insns=1000000 --param=max-unrolled-insns=1000000 zsojka at seznam dot cz
2023-11-30 15:06 ` [Bug tree-optimization/112785] " rguenth at gcc dot gnu.org
@ 2023-12-04 14:34 ` cvs-commit at gcc dot gnu.org
2023-12-04 14:59 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-04 14:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112785
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:0c2ea80a4ffbddc0bc29f5badaf2ae43e59483b2
commit r14-6120-g0c2ea80a4ffbddc0bc29f5badaf2ae43e59483b2
Author: Richard Biener <rguenther@suse.de>
Date: Mon Dec 4 14:50:59 2023 +0100
middle-end/112785 - guard against last_clique overflow
The PR shows that we'll ICE eventually when last_clique wraps. The
following avoids this by refusing to hand out new cliques after
exhausting them. We then use zero (no clique) as conservative
fallback.
PR middle-end/112785
* function.h (get_new_clique): New inline function handling
last_clique overflow.
* cfgrtl.cc (duplicate_insn_chain): Use it.
* tree-cfg.cc (gimple_duplicate_bb): Likewise.
* tree-inline.cc (remap_dependence_clique): Likewise.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/112785] ICE: in duplicate_insn_chain, at cfgrtl.cc:4386 with -O1 -funroll-all-loops --param=max-unroll-times=100000 --param=max-average-unrolled-insns=1000000 --param=max-unrolled-insns=1000000
2023-11-30 14:42 [Bug tree-optimization/112785] New: ICE: in duplicate_insn_chain, at cfgrtl.cc:4386 with -O1 -funroll-all-loops --param=max-unroll-times=100000 --param=max-average-unrolled-insns=1000000 --param=max-unrolled-insns=1000000 zsojka at seznam dot cz
2023-11-30 15:06 ` [Bug tree-optimization/112785] " rguenth at gcc dot gnu.org
2023-12-04 14:34 ` cvs-commit at gcc dot gnu.org
@ 2023-12-04 14:59 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-12-04 14:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112785
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-12-04 14:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-30 14:42 [Bug tree-optimization/112785] New: ICE: in duplicate_insn_chain, at cfgrtl.cc:4386 with -O1 -funroll-all-loops --param=max-unroll-times=100000 --param=max-average-unrolled-insns=1000000 --param=max-unrolled-insns=1000000 zsojka at seznam dot cz
2023-11-30 15:06 ` [Bug tree-optimization/112785] " rguenth at gcc dot gnu.org
2023-12-04 14:34 ` cvs-commit at gcc dot gnu.org
2023-12-04 14:59 ` rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).