From patchwork Thu Jan 15 12:23:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 429388 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 718A3140218 for ; Thu, 15 Jan 2015 23:23:34 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=tXQLlJTEbLtf1az77vX7xN3mzqwzOF9o4iA1CVYrVLwCvlYc8Xv0f PXU2x1ybkTb6+szx6DRnnYP9WKJvTCJD0+zCe/+TTQFX6h6eepU0aO9UPoxXbgfF Q5vE1pFvge3Ln97qXoP7kBbBShnmzPMKKM0fQhQyVaAz0ymmfCiN0I= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=ffpZIq+nd3Xrzxu9zQycVScyteM=; b=GmQz3M0YxDin+bAntcKW lQdUTckqZOwnzCYlDbh7X7jBCua2E2aAehMUEBbWDj0bn+XlHG8EjIUjB2UewpQX UrRY8kEMnz6QrkElMx2bLcJfw59OQM6BklCYyrKDeyVB+tZ6Xa4LHxFWCYqIm3oY Id2fjlS25NCBdGl71Lst34c= Received: (qmail 30065 invoked by alias); 15 Jan 2015 12:23:26 -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 30051 invoked by uid 89); 15 Jan 2015 12:23:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f44.google.com Received: from mail-pa0-f44.google.com (HELO mail-pa0-f44.google.com) (209.85.220.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 15 Jan 2015 12:23:24 +0000 Received: by mail-pa0-f44.google.com with SMTP id et14so17219023pad.3 for ; Thu, 15 Jan 2015 04:23:22 -0800 (PST) X-Received: by 10.68.226.166 with SMTP id rt6mr13574688pbc.120.1421324602089; Thu, 15 Jan 2015 04:23:22 -0800 (PST) Received: from gnu-tools-1.localdomain (c-24-7-26-57.hsd1.ca.comcast.net. [24.7.26.57]) by mx.google.com with ESMTPSA id r1sm1378557pdp.83.2015.01.15.04.23.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jan 2015 04:23:21 -0800 (PST) Received: by gnu-tools-1.localdomain (Postfix, from userid 1000) id 7C2E61C410B; Thu, 15 Jan 2015 04:23:20 -0800 (PST) Date: Thu, 15 Jan 2015 04:23:20 -0800 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Subject: PATCH: PR libitm/64360: libitm.c/stackundo.c fails with -fpic Message-ID: <20150115122320.GA28831@gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes Hi, libitm.c/stackundo.c fails with -fpic since test1 and test2 may be preempted with -fpic. This patch makes those 2 functions static. Tested on Linux/x86. OK for trunk? Thanks. H.J. ---- diff --git a/libitm/ChangeLog b/libitm/ChangeLog index 74e2940..e46819c 100644 --- a/libitm/ChangeLog +++ b/libitm/ChangeLog @@ -1,3 +1,9 @@ +2015-01-15 H.J. Lu + + PR libitm/64360 + * libitm.c/stackundo.c (test2): Make it static. + (test1): Likewise. + 2015-01-05 Jakub Jelinek Update copyright years. diff --git a/libitm/testsuite/libitm.c/stackundo.c b/libitm/testsuite/libitm.c/stackundo.c index 02759d7..c7d585e 100644 --- a/libitm/testsuite/libitm.c/stackundo.c +++ b/libitm/testsuite/libitm.c/stackundo.c @@ -1,10 +1,10 @@ -int __attribute__((noinline)) test2(int x[1000]) +static int __attribute__((noinline)) test2(int x[1000]) { int i; return x[12]; } -int __attribute__((noinline)) test1() +static int __attribute__((noinline)) test1() { int x[1000], i;