From patchwork Thu Mar 28 12:39:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejas Belagod X-Patchwork-Id: 231999 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id C18B62C00BB for ; Thu, 28 Mar 2013 23:40:17 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=jXpNGnLJ3khhZiY+j b9CHYVaQYMIdCDpLpe2aVFXANnBPwZXhY1iosPwCCae8msN+9iSJ52aITDVc7n7B NRAtaJVG5IgjmRXvnhaaSUAzeG+oppBI82EpuR17LeiLJekbEkCZK1vQ0x69gVvZ YskP2XJSATo7oW/aEmShuWw0KU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=tXxRPQDvv9B3u2tcfbiw6SK iFO4=; b=xdINheJQ93/5dSpI9tXQuFAs0eJCc1WOAKqh7dOcMgABHIZtsz1D+z1 abAl5x+b4Zzh5VCMdDxTKN57ZZH9PH5Trzr0hPGp3wkZd7k6uFVMqnYXBXuUj1xx O8N70Ug7/7Fc4m1/i4uTMRgqSfgeLXgtGwACUvaW+14HmZpDwEDM= Received: (qmail 17633 invoked by alias); 28 Mar 2013 12:40:05 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 17538 invoked by uid 89); 28 Mar 2013 12:39:58 -0000 X-Spam-SWARE-Status: No, score=-5.2 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL, TW_TM autolearn=ham version=3.3.1 Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 28 Mar 2013 12:39:54 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Thu, 28 Mar 2013 12:39:51 +0000 Received: from [10.1.69.28] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Thu, 28 Mar 2013 12:39:51 +0000 Message-ID: <51543A16.7070505@arm.com> Date: Thu, 28 Mar 2013 12:39:50 +0000 From: Tejas Belagod User-Agent: Thunderbird 2.0.0.18 (X11/20081120) MIME-Version: 1.0 To: Richard Biener CC: "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH] Fix PR56694 References: In-Reply-To: X-MC-Unique: 113032812395110601 X-Virus-Found: No Richard Biener wrote: > This fixes PR56694 - the code keeping BLOCKs live is not looking > at the EH tree for references. In the must-not-throw failure_loc > such references can now appear. > > Fixed by reverting that to 4.7 behavior. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk > and 4.8 branch. > > Richard. > > 2013-03-25 Richard Biener > > PR middle-end/56694 > * tree-eh.c (lower_eh_must_not_throw): Strip BLOCKs from the > must-not-throw stmt location. > > * g++.dg/torture/pr56694.C: New testcase. > > Index: gcc/tree-eh.c > =================================================================== > *** gcc/tree-eh.c (revision 197029) > --- gcc/tree-eh.c (working copy) > *************** lower_eh_must_not_throw (struct leh_stat > *** 1855,1861 **** > this_region = gen_eh_region_must_not_throw (state->cur_region); > this_region->u.must_not_throw.failure_decl > = gimple_eh_must_not_throw_fndecl (inner); > ! this_region->u.must_not_throw.failure_loc = gimple_location (tp); > > /* In order to get mangling applied to this decl, we must mark it > used now. Otherwise, pass_ipa_free_lang_data won't think it > --- 1855,1862 ---- > this_region = gen_eh_region_must_not_throw (state->cur_region); > this_region->u.must_not_throw.failure_decl > = gimple_eh_must_not_throw_fndecl (inner); > ! this_region->u.must_not_throw.failure_loc > ! = LOCATION_LOCUS (gimple_location (tp)); > > /* In order to get mangling applied to this decl, we must mark it > used now. Otherwise, pass_ipa_free_lang_data won't think it > Index: gcc/testsuite/g++.dg/torture/pr56694.C > =================================================================== > *** gcc/testsuite/g++.dg/torture/pr56694.C (revision 0) > --- gcc/testsuite/g++.dg/torture/pr56694.C (working copy) > *************** > *** 0 **** > --- 1,30 ---- > + // { dg-do compile } > + // { dg-options "-fopenmp" } > + Hi, This fails to build on 'bare-metal'(non-OS) targets. The attached patch fixes this from FAIL -> UNSUPPORTED for bare-metal targets. Tested on bare-metal aarch64 (aarch64-none-elf). OK? Thanks, Tejas Belagod. ARM. Changelog: 2013-03-28 Tejas Belagod testsuite/ * g++.dg/torture/pr56694.C: Fix test case to build on bare-metal targets. diff --git a/gcc/testsuite/g++.dg/torture/pr56694.C b/gcc/testsuite/g++.dg/torture/pr56694.C index 22bfe3c..d3de051 100644 --- a/gcc/testsuite/g++.dg/torture/pr56694.C +++ b/gcc/testsuite/g++.dg/torture/pr56694.C @@ -1,5 +1,6 @@ // { dg-do compile } // { dg-options "-fopenmp" } +// { dg-require-effective-target fopenmp } class GException { public: