From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0735B3896815; Thu, 30 Apr 2020 15:59:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0735B3896815 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588262382; bh=N0iJSsqsUPrgM38eqp4K/m4g/wQowFqFt4/cGp2YxYA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=slTkjqg4u88UU24UCO8MJIQ1tHqCmE5adegwbWBbGqVwGtEtaTyBf0w12J8ns6/I1 RHdRj4v6gK50/RYacZ5TdoWVxd4a+bkPSAvgSvefawCmpA0zO7rBGYexfy/4pUwgKJ 6i2JsK689SChW+MFTuRh38Yl40zB/Lrnyjnfu4uQ= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/94856] [10/11 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 15:59:41 +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-checking, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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 15:59:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94856 --- Comment #9 from CVS Commits --- The master branch has been updated by Martin Jambor : https://gcc.gnu.org/g:b31ede6e376302047830691fe6249be3ade0a2c0 commit r11-1-gb31ede6e376302047830691fe6249be3ade0a2c0 Author: Martin Jambor Date: Thu Apr 30 17:59:00 2020 +0200 ipa: Cgraph verification fix (PR 94856) PR 94856 is a call graph verifier error. We have a method which (in the course of IPA-CP) loses its this pointer because it is unused and the pass then does not clone all the this adjusting thunks and just makes the calls go straight to the new clone - and then the verifier complains that the edge does not seem to point to a clone of what it used to. This looked weird because the verifier actually has logic detecting this case but it turns out that it is confused by inliner body-saving mechanism which invents a new decl for the base function. Making the inlining body-saving mechanism to correctly set former_clone_of allows us to detect this case too. Then we pass this particular round of verification but the subsequent one fails because we have inlined the function into its former thunk - which subsequently does not have any callees, but the verifier still access them and segfaults. Therefore the patch also adds a test whether the a former hunk even has any call. 2020-04-30 Martin Jambor PR ipa/94856 * cgraph.c (clone_of_p): Also consider thunks whih had their bo= dies saved by the inliner and thunks which had their call inlined. * ipa-inline-transform.c (save_inline_function_body): Fill in former_clone_of of new body holders. PR ipa/94856 * g++.dg/ipa/pr94856.C: New test.=