Patchwork [testsuite] gcc.dg/vect/pr48765: fix option conflict

login
register
mail settings
Submitter Janis Johnson
Date Sept. 19, 2012, 2:11 a.m.
Message ID <505929BC.8090004@mentor.com>
Download mbox | patch
Permalink /patch/184904/
State New
Headers show

Comments

Janis Johnson - Sept. 19, 2012, 2:11 a.m.
Test gcc.dg/vect/pr48765, run only for powerpc*-*-*, unconditionally
adds -mcpu=power6 to the command line.  It also adds -m64, although
tests should rely on different multilib flags for that and skip the
test if not lp64 if the test can only be run with -m64.

For all of the Power multilib flags that I normally test, the vect test
infrastructure either skips the tests (for E500) or adds "-maltivec
-mcpu=970" which conflicts with the "-mcpu=power6" in this test and
causes the test to fail to compile.

The "-m64" definitely has to go.  If the "-mcpu=power6" needs to stay in
order to use the flags that triggered the ICE for which the test was
added, then the test should be skipped if some other -mcpu option will
override it.  Another option is to remove that and figure that
occasionally someone will run tests for power6.

This version keeps "-mcpu=power6" and skips the tests if another -mcpu
is already specified.  OK for trunk, and for 4.7 when the branch opens?

Janis
2012-09-18  Janis Johnson  <janisjo@codesourcery.com>

	* gcc.dg/vect/pr48765.c: Skip for conflicting options, don't
	specify -m64.

Patch

Index: gcc.dg/vect/pr48765.c
===================================================================
--- gcc.dg/vect/pr48765.c	(revision 386848)
+++ gcc.dg/vect/pr48765.c	(working copy)
@@ -1,5 +1,6 @@ 
-/* { dg-do compile { target powerpc*-*-* } } */
-/* { dg-options "-m64 -O3 -mcpu=power6" } */
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
+/* { dg-options "-O3 -mcpu=power6" } */
 
 enum reg_class
 {