From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30585 invoked by alias); 24 Oct 2018 21:56:33 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 30556 invoked by uid 89); 24 Oct 2018 21:56:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:898 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 24 Oct 2018 21:56:31 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6EAA13082E09; Wed, 24 Oct 2018 21:56:30 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-60.rdu2.redhat.com [10.10.112.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id C312B60161; Wed, 24 Oct 2018 21:56:28 +0000 (UTC) Subject: Re: [PATCH, testsuite] Fix sibcall-9 and sibcall-10 with -fPIC To: Thomas Preudhomme , Rainer Orth , Mike Stump , Jakub Jelinek , gcc-patches@gcc.gnu.org References: From: Jeff Law Openpgp: preference=signencrypt Message-ID: <0f618f3e-2fbc-afb6-aaa0-6ab977365843@redhat.com> Date: Wed, 24 Oct 2018 22:31:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg01549.txt.bz2 On 10/23/18 7:30 AM, Thomas Preudhomme wrote: > Hi, > > gcc.dg/sibcall-9.c and gcc.dg/sibcall-10.c give execution failure > on ARM when compiled with -fPIC due to the PIC access to volatile > variable v creating an extra spill which causes the frame size of the > two recursive functions to be different. Making the variable static > solve the issue because the variable can be access in a PC-relative way > and avoid the spill, while still testing sibling call as originally > intended. > > ChangeLog entry is as follows: > > *** gcc/testsuite/ChangeLog *** > > * gcc.dg/sibcall-9.c: Make v static. > * gcc.dg/sibcall-10.c: Likewise. > > Tested both testcase with and without -fPIC and it now passes in both > case when targeting arm-none-eabi. It also passes in both cases on > x86_64-linux-gnu. > > Is this ok for trunk? OK. Jeff