From patchwork Wed Dec 31 16:46:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Bowman X-Patchwork-Id: 424808 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 4F78C1400EA for ; Thu, 1 Jan 2015 03:46:42 +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:from :to:subject:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=Fct kftiwRXwFxARaS04PpqlQJiXO2pkrsriKtDwUIOUbDUfEAVFSf+czrwtTN+cfGSK YbG8RCcCdC2pN6lCM9hKMYRiX+pIALpdfcqT70vIFPSUvGps4EfqpvqExMc19SE7 X5j/Vxht9UJKzjWJKh0EeqbyEHFXuq6T8k3iN4d4= 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:from :to:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=default; bh=4VnIFq8cI x2brdW6j1lOTxlAZak=; b=YRu0EIbF4vzz1RTydMwtJ6zE3cNMSg+k9YM1DdWpu k/XYxNQc/Xb0dzQHQwZZ69YbPVRaXJTaFceAHm3LkHS74rcAQ6NBuGPlsyX/4Gxx URL4/p/+1HKA5xyx/Fa0H5aIWGyn0u7H9Dt6pTfzbQZLwL52OgLnbkRnNheMM3Bx YE= Received: (qmail 16415 invoked by alias); 31 Dec 2014 16:46:35 -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 16400 invoked by uid 89); 31 Dec 2014 16:46:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: smtp-out4.electric.net Received: from smtp-out4.electric.net (HELO smtp-out4.electric.net) (192.162.216.185) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 31 Dec 2014 16:46:32 +0000 Received: from 1Y6MPk-0004vI-Vk by out4a.electric.net with emc1-ok (Exim 4.80.1) (envelope-from ) id 1Y6MPl-0004vl-TP for gcc-patches@gcc.gnu.org; Wed, 31 Dec 2014 08:46:29 -0800 Received: by emcmailer; Wed, 31 Dec 2014 08:46:29 -0800 Received: from [82.0.240.193] (helo=GLAEXCH3.ftdi.local) by out4a.electric.net with esmtps (TLSv1:AES128-SHA:128) (Exim 4.80.1) (envelope-from ) id 1Y6MPk-0004vI-Vk for gcc-patches@gcc.gnu.org; Wed, 31 Dec 2014 08:46:28 -0800 Received: from GLAEXCH1.ftdi.local ([172.16.0.121]) by glaexch3 ([172.16.0.161]) with mapi id 14.01.0438.000; Wed, 31 Dec 2014 16:46:28 +0000 From: James Bowman To: "gcc-patches@gcc.gnu.org" Subject: [PATCH] pass pr20621 testcase on a small stack target Date: Wed, 31 Dec 2014 16:46:28 +0000 Message-ID: MIME-Version: 1.0 X-Outbound-IP: 82.0.240.193 X-Env-From: james.bowman@ftdichip.com X-PolicySMART: 3094660 Test pr20621 requires a target with more than 64K of available stack. This patch adds a path to pass the test when the target has declared a STACK_SIZE of 64K or less 2014-12-30 James Bowman * gcc/testsuite/gcc.c-torture/execute/pr20621-1.c: pass if stack < 64K --- James Bowman FTDI Open Source Liaison Index: gcc/testsuite/gcc.c-torture/execute/pr20621-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/pr20621-1.c (revision 215531) +++ gcc/testsuite/gcc.c-torture/execute/pr20621-1.c (working copy) @@ -1,6 +1,10 @@ /* When generating o32 MIPS PIC, main's $gp save slot was out of range of a single load instruction. */ +#if defined(STACK_SIZE) && STACK_SIZE <= 0x10000 +int main (void) { return 0; } +#else struct big { int i[sizeof (int) >= 4 && sizeof (void *) >= 4 ? 0x4000 : 4]; }; struct big gb; int foo (struct big b, int x) { return b.i[x]; } int main (void) { return foo (gb, 0) + foo (gb, 1); } +#endif