From patchwork Sat Oct 6 02:24:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dehao Chen X-Patchwork-Id: 189660 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 CA1012C00C1 for ; Sat, 6 Oct 2012 12:25:05 +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=1350095106; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=xBVjOmG VUjTA9qvHvBGAOBc01Jw=; b=bsNIwFpx/SQTvp8Ogh9k4iNRFs/PGyLTTMc72s8 xtO2l/6nA4FWHe5AG/UNZ1j7UH3ZEyPSODsipwYCojKRrxNmzZj0jQWbyka4B9A6 53VLWHzIwNIV5DkFL5N9Upo1Shuoz1z/5YBvb4w3Bvi3DgykioQjL8T4gOHW/ntr 6kYM= 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:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: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=sRfMkcw/5eePOf3d2E/iErzvbdBX9hNHItvNbOa9t0bc0MW7cEg+QTTQCkvduO 9cZ84CJujWUYc3Vvfi6xvBRWgGfdz+r2zVrtcsqmS01Y8eqPjIVzBmheR85cH95c 5NRmKwV3tHJnsTHoWyZYQlBJ6BU/3kXf6QLqiAMGib6Kw=; Received: (qmail 27462 invoked by alias); 6 Oct 2012 02:25:01 -0000 Received: (qmail 27454 invoked by uid 22791); 6 Oct 2012 02:25:00 -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, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, TW_TM X-Spam-Check-By: sourceware.org Received: from mail-pb0-f47.google.com (HELO mail-pb0-f47.google.com) (209.85.160.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 06 Oct 2012 02:24:54 +0000 Received: by mail-pb0-f47.google.com with SMTP id ro12so2590456pbb.20 for ; Fri, 05 Oct 2012 19:24:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-system-of-record:x-gm-message-state; bh=c2bq1gzjMOSvGPrREghVzJU1tGDpRDaQuMDxOATYJWk=; b=a83PeRcHZ+0tBjpS9fkAFkD67AgbtYJGe97R2L0yzuAqUIpAXE2dvc94V73mZpI2W9 Dlqkdp6BZcCUjQF4r4xhj39XXM6TJVSYllu+uANsOwNNqSSgI4/g6SNLDjxwBlN33P9W M0uaxPH3b/GBty8GWXesrTq/G4Z5283sUnf65XGlKPJbmm5RjHtFxSPGctYlJdiud1ZO DNrdcRTUJ99fiWl2xqSrlBZDGXp5xJFndsttnMY4bNEyamubXz/txDrJrRH+j52vdCKL BP4jUtSRhdi+UlojHGg/qsp5WT5hTRKX7oMgqcYSYJvIVWkyAgU2cowe4EZcxwwlOak9 kAMg== MIME-Version: 1.0 Received: by 10.66.82.101 with SMTP id h5mr26265368pay.15.1349490293556; Fri, 05 Oct 2012 19:24:53 -0700 (PDT) Received: by 10.68.49.232 with HTTP; Fri, 5 Oct 2012 19:24:53 -0700 (PDT) Date: Fri, 5 Oct 2012 19:24:53 -0700 Message-ID: Subject: [PATCH] Fix PR54826 From: Dehao Chen To: GCC Patches X-System-Of-Record: true X-Gm-Message-State: ALoCoQns6d1q/b3gwS1azQFbTPDfkJJ9/UgYqWMjqA+0BMtGJeX0BsVGI2dvZpMs+E7Xjh4nR2/tOq670pn0yVFrXZs3i3tv5Anch2KdHXG+TSSKLTk8hkW/cr9zozpU6YOAhHT30rBsOPzwVDpiXdxFs7VykiJPMQitkZ7ez1qi0eNZTLvuO8PeGbIIupCta2hhiAdd/uIV 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 Hi, This patch fixes PR54826. When lowering the gimple, the block for call arg also need to be reset. Bootstrapped and passed gcc regression test on x86. Okay for trunk? Thanks, Dehao 2012-10-05 Dehao Chen * gimple-low.c (lower_stmt): Set the block for call args. Index: gcc/gimple-low.c =================================================================== --- gcc/gimple-low.c (revision 192147) +++ gcc/gimple-low.c (working copy) @@ -425,7 +425,15 @@ lower_stmt (gimple_stmt_iterator *gsi, struct lowe case GIMPLE_CALL: { tree decl = gimple_call_fndecl (stmt); + unsigned i; + for (i = 0; i < gimple_call_num_args (stmt); i++) + { + tree arg = gimple_call_arg (stmt, i); + if (EXPR_P (arg)) + TREE_SET_BLOCK (arg, data->block); + } + if (decl && DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL && DECL_FUNCTION_CODE (decl) == BUILT_IN_SETJMP)