From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 191783858D20; Mon, 12 Jun 2023 11:33:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 191783858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686569637; bh=RJeX1LSsS37ZaFbbZIGrOWVWfIXAH0/7lvlvDrDzEJw=; h=From:To:Subject:Date:From; b=AeKNYEmSIVvtk3+KPbj3qEmbo7dQEFtiK4MC8ldhS/p6QNxiIS7tZKXN7NF4bbxOv fiwtdDr0IF6A+V/OA6GYZZdUWEt+M19sgfE68ZETxZ8MqTx/NcUZNzwJ16fno4z/Ca eDCZhxDbvph1tTw00nuL8NGMlN50W6jcvzsWr7NQ= From: "daniel at rozsnyo dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/110220] New: ICE in patch_jump_insn, at cfgrtl.cc:1295 - avr/xmega Date: Mon, 12 Jun 2023 11:33:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: daniel at rozsnyo dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110220 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=3D55308&action=3Dedit Code that fails to compile After I migrated from gcc-4.8/4.9 to recent versions, both the gcc-14.0.0 a= nd 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 =E2=80=98cmd_parse=E2=80=99: 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=3Datxmega128a4u -std=3Dgnu99 -c insn-bug-minimal= .c -o bug.o=