From patchwork Tue Jun 7 23:24:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janis Johnson X-Patchwork-Id: 99343 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 C36C6B6FA7 for ; Wed, 8 Jun 2011 09:24:41 +1000 (EST) Received: (qmail 32533 invoked by alias); 7 Jun 2011 23:24:40 -0000 Received: (qmail 32525 invoked by uid 22791); 7 Jun 2011 23:24:39 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Jun 2011 23:24:25 +0000 Received: (qmail 17531 invoked from network); 7 Jun 2011 23:24:23 -0000 Received: from unknown (HELO ?192.168.1.5?) (janisjo@127.0.0.2) by mail.codesourcery.com with ESMTPA; 7 Jun 2011 23:24:23 -0000 Message-ID: <4DEEB332.2070706@codesourcery.com> Date: Tue, 07 Jun 2011 16:24:34 -0700 From: Janis Johnson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 MIME-Version: 1.0 To: "Joseph S. Myers" CC: gcc-patches@gcc.gnu.org Subject: Re: [testsuite] skip ARM tests with conflicting options References: <4DEE8FE7.50001@codesourcery.com> In-Reply-To: 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 On 06/07/2011 02:07 PM, Joseph S. Myers wrote: > On Tue, 7 Jun 2011, Janis Johnson wrote: > >> Several tests in gcc.target/arm use dg-options with -mcpu=xxxx, which >> causes compiler warnings or errors when the multilib flags include >> -march=yyyy. This patch causes those tests to be skipped. It also >> prevents gcc.target/arm/20090811-1.c from running with multilibs that >> would override -mcpu or -mfloat-abi options specified for the test. > > I think you should allow compatible -march options - for example, if > dg-options has -mcpu=cortex-a8, allow -march=armv7-a but disallow all > other -march options. > Is this one OK? I got the arch lists by compiling the -mcpu options from the tests with each of the -march options listed in the GCC manual to find the ones that don't get warnings or errors. 2011-06-07 Janis Johnson * gcc/testsuite/gcc.target/arm/20090811-1.c: Skip for incompatible options, do not override other options. * gcc/testsuite/gcc.target/arm/combine-cmp-shift.c: Skip for incompatible options. * gcc/testsuite/gcc.target/arm/pr45094.c: Likewise. * gcc/testsuite/gcc.target/arm/scd42-1.c: Likewise. * gcc/testsuite/gcc.target/arm/scd42-3.c: Likewise. * gcc/testsuite/gcc.target/arm/thumb-ltu.c: Likewise. Index: gcc/testsuite/gcc.target/arm/20090811-1.c =================================================================== --- gcc/testsuite/gcc.target/arm/20090811-1.c (revision 174764) +++ gcc/testsuite/gcc.target/arm/20090811-1.c (working copy) @@ -1,4 +1,7 @@ /* { dg-do compile } */ +/* { dg-skip-if "incompatible options" { arm*-*-* } { "-march=*" } { "-march=armv7-a" } } */ +/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" } { "-mcpu=cortex-a8" } } */ +/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */ /* { dg-options "-O3 -mcpu=cortex-a8 -mfpu=vfp3 -mfloat-abi=softfp" } */ typedef struct cb Index: gcc/testsuite/gcc.target/arm/combine-cmp-shift.c =================================================================== --- gcc/testsuite/gcc.target/arm/combine-cmp-shift.c (revision 174764) +++ gcc/testsuite/gcc.target/arm/combine-cmp-shift.c (working copy) @@ -1,3 +1,4 @@ +/* { dg-skip-if "incompatible options" { arm*-*-* } { "-march=*" } { "-march=armv7-a" } } */ /* { dg-options "-O2 -mcpu=cortex-a8" } */ /* { dg-final { scan-assembler "cmp\tr\[0-9\]*, r\[0-9\]*, asr #31" } } */ Index: gcc/testsuite/gcc.target/arm/pr45094.c =================================================================== --- gcc/testsuite/gcc.target/arm/pr45094.c (revision 174764) +++ gcc/testsuite/gcc.target/arm/pr45094.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "incompatible options" { arm*-*-* } { "-march=*" } { "-march=armv7-a" } } */ /* { dg-require-effective-target arm_neon_hw } */ /* { dg-options "-O2 -mcpu=cortex-a8" } */ /* { dg-add-options arm_neon } */ Index: gcc/testsuite/gcc.target/arm/scd42-1.c =================================================================== --- gcc/testsuite/gcc.target/arm/scd42-1.c (revision 174764) +++ gcc/testsuite/gcc.target/arm/scd42-1.c (working copy) @@ -1,5 +1,6 @@ /* Verify that mov is preferred on XScale for loading a 1 byte constant. */ /* { dg-do compile } */ +/* { dg-skip-if "incompatible options" { arm*-*-* } { "-march=*" } { "" } } */ /* { dg-options "-mcpu=xscale -O" } */ unsigned load1(void) __attribute__ ((naked)); Index: gcc/testsuite/gcc.target/arm/scd42-3.c =================================================================== --- gcc/testsuite/gcc.target/arm/scd42-3.c (revision 174764) +++ gcc/testsuite/gcc.target/arm/scd42-3.c (working copy) @@ -1,5 +1,6 @@ /* Verify that ldr is preferred on XScale for loading a 3 or 4 byte constant. */ /* { dg-do compile } */ +/* { dg-skip-if "incompatible options" { arm*-*-* } { "-march=*" } { "" } } */ /* { dg-options "-mcpu=xscale -O" } */ unsigned load4(void) __attribute__ ((naked)); Index: gcc/testsuite/gcc.target/arm/thumb-ltu.c =================================================================== --- gcc/testsuite/gcc.target/arm/thumb-ltu.c (revision 174764) +++ gcc/testsuite/gcc.target/arm/thumb-ltu.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "incompatible options" { arm*-*-* } { "-march=*" } { "-march=armv6" "-march=armv6j" "-march=armv6z" } } */ /* { dg-options "-mcpu=arm1136jf-s -mthumb -O2" } */ void f(unsigned a, unsigned b, unsigned c, unsigned d)