From patchwork Fri Sep 21 02:31:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dehao Chen X-Patchwork-Id: 185545 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 A61192C008B for ; Fri, 21 Sep 2012 12:32:01 +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=1348799523; 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=dwawZsk8YRMS8HNbN6emYUXp/X8=; b=v/BpBZmAnFtmHFCbxJ/gPaibNHOZHcDuq6cfea1KDOdit7/eoiCWiy/y++3xAH EyuS8LM2AlzaBur/9DVwHOE5HwW1lPz2ArK5B401chN5Ak2Ad4znM/xHxBGg5ErO i3zmZiE0nD5XyFLud0Eee8nSWwrleD1E2cIXICplyl5Is= 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=w/IVXP/WgDz2ogW6gMcKmjezmGmz9YjLGYPUv6tP6CoAVTdgy5K4xTIAzUTnqh DeTAvQHh1vDAmsH11dYOJhwPexlGY6GqLAKNpCwciP4rEIGuKu3ps/vTID2NdePP YmJYb/OEEFN5vS2B3UyGE5KSB4o5illzOk40F2XdIOygU=; Received: (qmail 6111 invoked by alias); 21 Sep 2012 02:31:59 -0000 Received: (qmail 6102 invoked by uid 22791); 21 Sep 2012 02:31:58 -0000 X-SWARE-Spam-Status: No, hits=-5.9 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, TW_TM 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 02:31:45 +0000 Received: by pabkp6 with SMTP id kp6so300353pab.20 for ; Thu, 20 Sep 2012 19:31:44 -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=JhaCs8MnTTyhd6a+9c2UpLmuBpwaOIrYC8PK+blbAXk=; b=I0s6WB+0/wA4OUzPjwSIBrlrd+7JRtnYMb7XKDcRldYlJt4vNyWsAp8/p/2u0TezbQ HGMlsqMdMpOdDyUvJDDGLkY14hIf4C968UqW1NEMM/4/GMZQ5YQXQunIppXyp5t/A++J uOiQ/2oCNLQRuwxZQuUdtCSvWZ7nilPROz/gTIJ/UUtrhee2QUhtZ/iAO0wIlfofmQug uz9xBMFZxJ3WiXbve9AgopjMxYwV/85AO9ff7VYw1/cn+tAk42ji0A+8+QX3r4gkkv8z 7XauwcgABuGq8HkiPdZPG8nG9+ZgkDbdZDKhfDKE12iv+aLDlPLHvY2FOOYgwEXat1lK yrpQ== Received: by 10.66.77.193 with SMTP id u1mr9648354paw.52.1348194704525; Thu, 20 Sep 2012 19:31:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.66.77.193 with SMTP id u1mr9648321paw.52.1348194704140; Thu, 20 Sep 2012 19:31:44 -0700 (PDT) Received: by 10.68.200.41 with HTTP; Thu, 20 Sep 2012 19:31:44 -0700 (PDT) In-Reply-To: References: Date: Fri, 21 Sep 2012 10:31:44 +0800 Message-ID: Subject: Re: [PATCH] Fix a bug that breaks go build From: Dehao Chen To: GCC Patches Cc: Richard Henderson , Ian Lance Taylor X-System-Of-Record: true X-Gm-Message-State: ALoCoQkhT2PKJJDwvNw2j1t3EFAEw+LLGmEkJDbfRM6Ubem/jbdJo7g5K5EjmD/F/zcoaPlugrnufLnv7IHlbxMnvrx0jmA+lbC/RlA21J4zF4WzrMUnqhiLlbTksN5gyckM+qdBK6mQFTEoxRpKi4jGvGevwbkemFz0e+V+ULhFFuwoE2irMN1UW7AiApHOnTuq8Xh+2XQ5 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 fixes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54649 The previous patch is incorrect and will cause regression to g++.dg/debug/dwarf2/deallocator.C A new patch is attached. It solved the bootstrap problem for go. Basically, when we set the line number for stmts in the finally block, we don't want to change its block info. The new patch can bootstrap, and passed gcc regression tests. Is it okay for trunk? Thanks, Dehao gcc/ChangeLog: 2012-09-20 Dehao Chen PR go/54649 * tree-eh.c (lower_try_finally_dup_block): Set the correct block for stmts in the duplicated EH block. Index: gcc/tree-eh.c =================================================================== --- gcc/tree-eh.c (revision 191586) +++ gcc/tree-eh.c (working copy) @@ -883,8 +883,15 @@ lower_try_finally_dup_block (gimple_seq seq, struc new_seq = copy_gimple_seq_and_replace_locals (seq); for (gsi = gsi_start (new_seq); !gsi_end_p (gsi); gsi_next (&gsi)) - if (IS_UNKNOWN_LOCATION (gimple_location (gsi_stmt (gsi)))) - gimple_set_location (gsi_stmt (gsi), loc); + { + gimple stmt = gsi_stmt (gsi); + if (IS_UNKNOWN_LOCATION (gimple_location (stmt))) + { + tree block = gimple_block (stmt); + gimple_set_location (stmt, loc); + gimple_set_block (stmt, block); + } + } if (outer_state->tf) region = outer_state->tf->try_finally_expr;