From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4D6DD385B833; Fri, 3 Apr 2020 10:18:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4D6DD385B833 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1585909114; bh=qgUnsBl7aRzI+53sLh3hKlhvKvVvKW9J9aI16FHGxSE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ILBk+5K+LBP24CvdFhZGX2VhuPgK5gT/WH33GQfaWq+jevg+lPPhrJ5JO7m7BGtSi 3somx8IMKnlYxhcwh6vs5tHMBRK59cKmbY+OA8tOh3Fmgd31L9DbWHQpSsS9tY2okC 9hzsfYzmIsacmGi6exJxIJulh2qGNo/Ppt8xxDnw= From: "jamborm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/93621] [10 Regression] ICE in redirect_call_stmt_to_callee, at cgraph.c:1443 since r10-5567 Date: Fri, 03 Apr 2020 10:18:34 +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: jamborm at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jamborm 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: Fri, 03 Apr 2020 10:18:34 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D93621 --- Comment #13 from Martin Jambor --- (In reply to Jan Hubicka from comment #12) > > Having said that, I am not sure where to best fix this so late in the > > GCC 10 development cycle. >=20 > So the problem is that thunk is expanded on the adjusted decl but we > still keep the adjustments and later fail to apply them? >=20 > I guess we have two options: > 1) force thunk expansion to happen on original decls (before cloning) > so the body ends up being same as for ordinary function I was thinking about this too. I will try to look into expand_thunk whether I can leave the call statement mostly alone (apart from the thunk transform itself, of course). > 2) remove the adjustments after expansion - this should IMO work > under the assumption that optimization passes don't insert > non-trivial code into the thunk before they expand the thunk (i.e. > if you want to adjust it in ipa-sra you will want to first produce > the thunk and then do adjustement) > It seems to me that 2 should be not that hard to implement > Does that make sense? Unfortunately I don't think so. The adjustment is attached to the callee (just like in the past the skip_args bitmap was - and we're only skipping arguments in the testcase), so you cannot just remove it in one caller. Or am I missing something?=