public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Janis Johnson <janisjo@codesourcery.com>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [testsuite] skip ARM tests with conflicting options
Date: Tue, 07 Jun 2011 23:37:00 -0000	[thread overview]
Message-ID: <4DEEB332.2070706@codesourcery.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1106072107150.4984@digraph.polyomino.org.uk>

[-- Attachment #1: Type: text/plain, Size: 819 bytes --]

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.

[-- Attachment #2: gcc-20110607-2 --]
[-- Type: text/plain, Size: 3686 bytes --]

2011-06-07  Janis Johnson  <janisjo@codesourcery.com>

	* 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)

  parent reply	other threads:[~2011-06-07 23:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-07 21:12 Janis Johnson
2011-06-07 21:20 ` Joseph S. Myers
2011-06-07 22:25   ` Janis Johnson
2011-06-07 23:37   ` Janis Johnson [this message]
2011-06-08  2:03     ` Mike Stump
2011-06-08  2:54       ` Janis Johnson
2011-06-08 11:47         ` Richard Earnshaw
2011-06-08 16:13           ` Janis Johnson
2011-06-08 19:34             ` Mike Stump
2011-06-08 20:51               ` Janis Johnson
2011-06-08 19:39           ` Mike Stump
2011-06-10  0:11           ` Janis Johnson
2011-06-10 10:12             ` Richard Earnshaw
2011-06-10 16:22               ` Janis Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DEEB332.2070706@codesourcery.com \
    --to=janisjo@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).