From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C54833858C52; Wed, 31 Aug 2022 08:58:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C54833858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661936306; bh=pykj8taYojWR99i2YUEUVis3sUauNYdRWyx0aSXdza4=; h=From:To:Subject:Date:From; b=QYsfZRlg14yJ1kE/6OVbDTf8x4D7BYsOpIk05u7bZDjGi/Gb9/yQNL5v+BopU+HfF jxM+VYskkUQXoaXlwhtzjI32wGTh8FOpF1RODL3xAWy1h2Vw9si+Tz5PCR+CNaVOXW 0UL/yklZRZlUDNYKRQluAkwM4X3U6zOUSyoybXf0= From: "amonakov at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/106783] New: [12/13 Regression] ICE in ipa-modref.cc:analyze_function Date: Wed, 31 Aug 2022 08:58:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: amonakov at gcc dot gnu.org 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 keywords bug_severity priority component assigned_to reporter cc target_milestone 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=3D106783 Bug ID: 106783 Summary: [12/13 Regression] ICE in ipa-modref.cc:analyze_function Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: amonakov at gcc dot gnu.org CC: amonakov at gcc dot gnu.org, asolokha at gmx dot com, marxin at gcc dot gnu.org, unassigned at gcc dot gnu.org Target Milestone: --- +++ This bug was initially created as a clone of Bug #106781 +++ ICEs when emitting a tree dump with -O2 -fdump-tree-modref2 int n; __attribute__ ((noinline,noclone,returns_twice)) static int bar (int) { n /=3D 0; return n; } int foo (int x) { return bar (x); } t.c: In function =E2=80=98foo=E2=80=99: t.c:12:1: internal compiler error: in analyze_function, at ipa-modref.cc:32= 86 12 | foo (int x) | ^~~ 0x10e548e analyze_function gcc/ipa-modref.cc:3286 0x10e83b5 execute gcc/ipa-modref.cc:4186 Note that -fdump-tree-modref2 is needed. It reaches a gcc_unreachable(), I'd suggest to move the verification outside of dumping if possible, so the compiler doesn't ICE or not depending on whether dumping is requested.=