public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/110220] New: ICE in patch_jump_insn, at cfgrtl.cc:1295 - avr/xmega
@ 2023-06-12 11:33 daniel at rozsnyo dot com
  2023-06-12 16:13 ` [Bug rtl-optimization/110220] [13/14 Regression] " pinskia at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: daniel at rozsnyo dot com @ 2023-06-12 11:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110220

            Bug ID: 110220
           Summary: ICE in patch_jump_insn, at cfgrtl.cc:1295 - avr/xmega
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: daniel at rozsnyo dot com
  Target Milestone: ---

Created attachment 55308
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55308&action=edit
Code that fails to compile

After I migrated from gcc-4.8/4.9 to recent versions, both the gcc-14.0.0 and
gcc-13.1.1 fail to compile my pretty large avr-mcu project at one specific
function/construct. While I have found a solution with making the code
differently constructed to not trigger the ICE, now that I found time, I did
reduce the output of the  -save-temps into a single function that triggers the
assertion.


during RTL pass: jump
insn-bug-minimal.c: In function ‘cmd_parse’:
insn-bug-minimal.c:184:1: internal compiler error: in patch_jump_insn, at
cfgrtl.cc:1295
  184 | }
      | ^
0x90de427 internal_error(char const*, ...)
        ???:0
0x820f6af fancy_abort(char const*, int, char const*)
        ???:0
0x835a3be redirect_edge_and_branch(edge_def*, basic_block_def*)
        ???:0
0x8dc2b15 cleanup_cfg(int)
        ???:0


The way to avoid this ICE is to comment out one of the switch(state) cases, or
move one of them before the switch into an if-statement (my current function
equivalent workaround).

My cross-compile toolchain is made by gentoo crossdev package.

The ICE seems to be present only at -Os for the attached minimal source:
avr-gcc -g -Os -Wall -mmcu=atxmega128a4u -std=gnu99 -c insn-bug-minimal.c -o
bug.o

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-08-01 13:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-12 11:33 [Bug rtl-optimization/110220] New: ICE in patch_jump_insn, at cfgrtl.cc:1295 - avr/xmega daniel at rozsnyo dot com
2023-06-12 16:13 ` [Bug rtl-optimization/110220] [13/14 Regression] " pinskia at gcc dot gnu.org
2023-06-12 16:22 ` pinskia at gcc dot gnu.org
2023-06-12 16:25 ` daniel at rozsnyo dot com
2023-06-12 16:28 ` pinskia at gcc dot gnu.org
2023-06-12 16:28 ` pinskia at gcc dot gnu.org
2023-06-30 16:29 ` gjl at gcc dot gnu.org
2023-07-27  9:26 ` rguenth at gcc dot gnu.org
2023-08-01 11:51 ` cvs-commit at gcc dot gnu.org
2023-08-01 13:02 ` cvs-commit at gcc dot gnu.org
2023-08-01 13:05 ` [Bug target/110220] " gjl 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).