From patchwork Fri Sep 21 15:57:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dehao Chen X-Patchwork-Id: 185804 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]) by ozlabs.org (Postfix) with SMTP id B035A2C0086 for ; Sat, 22 Sep 2012 01:58:12 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1348847893; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: MIME-Version:Received:Received:In-Reply-To:References:Date: Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=WUieBP2nvE0Dp+4rNZu9LMzg6XM=; b=dNF9lu0p15ZTOuPYppwc5jViSEU5nf2Awgrd6K6cdZYwC90DLl+ctRapdzUMnc 1KTWuGpgtSeqmZA8yycDEww1/Gv78vwgdNliUzhf33K0okbrQHo7PPXS3paDgLV+ HSa8LlWc9tKpgrObrNeE6wfg5UI7zhYP2ntGD5QzM9YEc= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:Received:MIME-Version:Received:Received:In-Reply-To:References:Date:Message-ID:Subject:From:To:Cc:Content-Type:X-System-Of-Record:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=Ms+utvkxru9wc4zC7d/yeS0s1x2Kqa8U92Dw9JdlXDeakGDm4AY7SC0YpnyULl aUcRz57M6Max72SavKxuOgZ616qfYPlFMLOCpSmSouLXBRs5gUCzaIQlsTmkBBel JL0xeI/ulqzogTfo0FLXKQlVjvSho2cMBaiOOg3ryI6lQ=; Received: (qmail 15988 invoked by alias); 21 Sep 2012 15:58:06 -0000 Received: (qmail 15977 invoked by uid 22791); 21 Sep 2012 15:58:05 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-pa0-f47.google.com (HELO mail-pa0-f47.google.com) (209.85.220.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 21 Sep 2012 15:57:48 +0000 Received: by pabkp6 with SMTP id kp6so501543pab.20 for ; Fri, 21 Sep 2012 08:57:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-system-of-record:x-gm-message-state; bh=VHeVjLFPb27kamvSuuIKOaaNGEGHUNI8v1QtPLDqkEo=; b=hHjJHRjXIhapqIFFcIk0q2/4YBXefhXajrDdG1tb4ZEiBjauhCwySDf9onAtEVFa2k C029s4fMp36KSIEqUuLaI91LJT0lRszrK8ArGSIzUxNsE/r+SDAIHsn3q2HfRFzoer5Y n26hpx/apqIkNIsmdu03Sl2+wX1GaJIo0B4WJ7AAEsOc4TDQbZIYbU3l3tafbuktDX5t UodCLVSvUviOODxH76jD+1Qj21of9/l8//n1PkcH762njDjl/4CGqmqSzNQWkcMr7I0S DIDeYhWOL2OvE2/rdJJhnSl6wD0pQXZZ08imk77ZUtQiGbCH+m5S5I1x/sgWNELerLSv jMGA== Received: by 10.68.83.68 with SMTP id o4mr12916794pby.25.1348243067742; Fri, 21 Sep 2012 08:57:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.83.68 with SMTP id o4mr12916773pby.25.1348243067637; Fri, 21 Sep 2012 08:57:47 -0700 (PDT) Received: by 10.68.200.41 with HTTP; Fri, 21 Sep 2012 08:57:47 -0700 (PDT) In-Reply-To: References: Date: Fri, 21 Sep 2012 08:57:47 -0700 Message-ID: Subject: Re: [PATCH] Fix a bug that breaks go build From: Dehao Chen To: Ian Lance Taylor Cc: GCC Patches X-System-Of-Record: true X-Gm-Message-State: ALoCoQndRBLv2GF8skpLD3TTQZmLWOuyeFBZr+xCe5y/NihT6KC+lm7spdFo8icm9Woase2MJFAylYw0c2Hk41m/yiHvt6Ym94jdYG4NSncZ3o99h9TCA0m4y4AVijF2q8+KgIzdlTM32x1DhNssQg15g7LlA8/X5gzcFj8PiVWbkbE1yeiWmHm1eP1yvRuLRH4CRXKZeto+ X-IsSubscribed: yes 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 This patch was checked in as http://gcc.gnu.org/viewcvs?view=revision&revision=191614 I have another patch to add the new test. The new trunk can pass this test. If no objection, I'll check in this patch in an hour. Thanks, Dehao gcc/testsuite/ChangeLog: 2012-09-21 Dehao Chen PR go/54649 PR tree-optimization/54655 * g++.dg/pr54655.C: New testcase. Index: gcc/testsuite/g++.dg/pr54655.C =================================================================== --- gcc/testsuite/g++.dg/pr54655.C (revision 0) +++ gcc/testsuite/g++.dg/pr54655.C (revision 0) @@ -0,0 +1,35 @@ +// { dg-do compile } +/* { dg-options "-O1" } */ + +extern "C" class A +{ +}; + +template class B:A +{ +public: + B (int *, T); + ~B () + { + } +}; + +bool a; + +inline void +fn1 () +{ + switch (0) + case 0: + { + B b (0, 0); + if (a) + break; + } +} + +void +fn2 () +{ + fn1 (); +}