From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11674 invoked by alias); 31 Oct 2011 09:12:03 -0000 Received: (qmail 11655 invoked by uid 22791); 31 Oct 2011 09:12:01 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 31 Oct 2011 09:11:45 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id D2BB1CB0255; Mon, 31 Oct 2011 10:11:45 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Tbbs6c0kYSqP; Mon, 31 Oct 2011 10:11:36 +0100 (CET) Received: from [192.168.1.2] (bon31-9-83-155-120-49.fbx.proxad.net [83.155.120.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id F058ECB0231; Mon, 31 Oct 2011 10:11:35 +0100 (CET) From: Eric Botcazou To: "Chung-Lin Tang" Subject: Re: resent2 [PATCH] Fix ICE in redirect_jump, at jump.c:1497 PR50496 Date: Mon, 31 Oct 2011 10:53:00 -0000 User-Agent: KMail/1.9.9 Cc: Bernd Schmidt , Markus Trippelsdorf , gcc-patches@gcc.gnu.org References: <20111014085134.GA1662@x4.trippels.de> <4EA5A8C2.7060505@codesourcery.com> <4EAE6045.7070201@codesourcery.com> In-Reply-To: <4EAE6045.7070201@codesourcery.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201110311011.05280.ebotcazou@adacore.com> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg02838.txt.bz2 > I'm suggesting a new patch, as attached. Before reload_completed, we > directly return 0 upon nlabel == NULL, which should be identical with > old behavior, while asserting fail if after reload (where we assume the > simple_return/return distinction is required). > > This should ensure better that, if a post-prologue case of redirecting > to the exit block ever happens we will more easily know (by some future > PR :P) > > Bootstrapped and tested on i686, and cross tested on ARM using QEMU. > Eric, is this approach okay? Don't you want epilogue_completed instead of reload_completed? Otherwise, yes, the approach is fine with me, but wait for Bernd's input. > 2011-10-31 Chung-Lin Tang > > * jump.c (redirect_jump): Assert fail on nlabel == NULL_RTX > only after reload. Add comments. Minor rewording of the comment below: + if (!nlabel) + { /* If there is no label, we are asked to redirect to the EXIT block. Now, before the epilogue is emitted, return/simple_return cannot be created so we return 0 immediately. After the epilogue is emitted, we always expect a label, either a non-null label, or a return/simple_return RTX. + if (!reload_completed) + return 0; + gcc_unreachable (); + } -- Eric Botcazou