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

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).