From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2952B389683D; Thu, 30 Apr 2020 08:49:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2952B389683D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588236557; bh=DVNKdrNQvm4a6hsU01ZBJIWLi4Weyqe2dJ9SeVifB9I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pTKw/gi2Y+vu+9S06LZXFsrUQG2S2qnZI9/zR1/Gp4ydhID+mvQwr5wGbR++W9peq honIW6oSWglaof77b9W1/5v+1vdmKaqUVbBXPR45sk2oiAp6WddQVWfD05mgESO7Eo mTOay5Y6vORxnni+iKQ+38aT5EC4g9Fl4416ybxI= From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/94856] [10 Regression] ICE: Segmentation fault (in clone_of_p); or ICE: verify_cgraph_node failed (error: edge points to wrong declaration) since r10-4944-g1e83bd7003e03160 Date: Thu, 30 Apr 2020 08:49:16 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2020 08:49:17 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94856 --- Comment #5 from Martin Li=C5=A1ka --- So the GNU TM is involved only very slightly as it prevents one inlining candidate: Without -fgnu-tm: Enqueueing calls in d::~d()/9. Estimating body: c.constprop/34 Known to be false: not inlined size:0 time:0.000000 nonspec time:2.000000 Estimating body: c.constprop/34 Known to be false: not inlined size:0 time:0.000000 nonspec time:2.000000 enqueuing call d::~d()/9 -> c.constprop/34, badness -inf With -fgnu-tm: pr47218.ii:14:25: missed: not inlinable: d::~d()/9 -> c.constprop/34, reason is this: ipa-inline.c:364: /* TM pure functions should not be inlined into non-TM_pure functions. */ else if (is_tm_pure (callee->decl) && !is_tm_pure (caller->decl)) { e->inline_failed =3D CIF_UNSPECIFIED; inlinable =3D false; } The following patch can cause the ICE without -fgnu-tm: diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index f71443feff7..cb968059a28 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -361,7 +361,8 @@ can_inline_edge_p (struct cgraph_edge *e, bool report, } /* TM pure functions should not be inlined into non-TM_pure functions. */ - else if (is_tm_pure (callee->decl) && !is_tm_pure (caller->decl)) + else if (strcmp (callee->name(), "c.constprop") =3D=3D 0 + && strcmp (caller->name(), "d::~d()") =3D=3D 0) { e->inline_failed =3D CIF_UNSPECIFIED; inlinable =3D false; @Martin, Honza: Can you please take a look? I tend to mark it as P1.=