From patchwork Mon Jul 25 16:11:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 106714 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 9EA69B70B1 for ; Tue, 26 Jul 2011 02:12:39 +1000 (EST) Received: (qmail 9404 invoked by alias); 25 Jul 2011 16:12:36 -0000 Received: (qmail 9389 invoked by uid 22791); 25 Jul 2011 16:12:32 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, SPF_FAIL X-Spam-Check-By: sourceware.org Received: from smtp-vbr11.xs4all.nl (HELO smtp-vbr11.xs4all.nl) (194.109.24.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 25 Jul 2011 16:12:17 +0000 Received: from [192.168.0.101] ([89.42.210.59]) (authenticated bits=0) by smtp-vbr11.xs4all.nl (8.13.8/8.13.8) with ESMTP id p6PGBrHt026606 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 25 Jul 2011 18:11:58 +0200 (CEST) (envelope-from vries@codesourcery.com) Message-ID: <4E2D95C3.8030705@codesourcery.com> Date: Mon, 25 Jul 2011 19:11:47 +0300 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: Richard Earnshaw CC: Ramana Radhakrishnan , Janis Johnson , "gcc-patches@gcc.gnu.org" Subject: Re: [PR43597, ARM, TESTCASE] References: <4E24146F.8000508@codesourcery.com> <4E2424DF.3070808@arm.com> In-Reply-To: <4E2424DF.3070808@arm.com> 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, thanks for the review. On 07/18/2011 03:19 PM, Richard Earnshaw wrote: > On 18/07/11 12:09, Tom de Vries wrote: >> Hi, >> >> PR43597 was fixed by http://gcc.gnu.org/viewcvs?view=revision&revision=172032. >> >> This patch adds a testcase. >> >> OK for trunk? >> >> Thanks, >> - Tom >> >> 2011-07-18 Tom de Vries >> >> PR target/43597 >> * gcc.target/arm/pr43597.c: New test. >> >> > > No, don't pass -mthumb through dg-options unless you're using something > like require-effective-target. > OK, I see. > In this case the post-compile tests are all gated on thumb2. So why not > make the whole test just require arm_thumb2_ok? > > R. > Done. OK for trunk? Thanks, - Tom 2011-07-25 Tom de Vries PR target/43597 * gcc.target/arm/pr43597.c: New test. Index: gcc.target/arm/pr43597.c =================================================================== --- gcc.target/arm/pr43597.c (revision 0) +++ gcc.target/arm/pr43597.c (revision 0) @@ -0,0 +1,28 @@ +/* { dg-do assemble } */ +/* { dg-options "-Os -save-temps -mthumb" } */ +/* { dg-require-effective-target arm_thumb2_ok } */ + +extern int bar (); +extern void bar2 (int); + +int +foo4 () +{ + int result = 0; + int f = -1; + f = bar (); + if (f < 0) + { + result = 1; + goto bail; + } + bar (); + bail: + bar2 (f); + return result; +} + +/* { dg-final { scan-assembler-times "sub" 1 } } */ +/* { dg-final { scan-assembler-times "cmp" 0 } } */ +/* { dg-final { object-size text <= 30 } } */ +/* { dg-final { cleanup-saved-temps "pr43597" } } */