Many tests in gcc.target/arm that specify "-march=" fail compilation when multilib flags include "-mcpu=" due to warnings about conflicts in switches, but then go on to pass the remainder of the test. This patch causes some of those tests to ignore that compiler warning; I'll get to the rest later.
Alternate options for tests that specify -march is to skip for multilibs that include -mcpu, or a new test directive or effective target to skip a test if the options used generate a warning. Tested on arm-none-linux-gnueabi with a variety of multilib flags, including some with "-mcpu=". OK for trunk and 4.6? Janis
2011-06-14 Janis Johnson <jani...@codesourcery.com> * mla-1.c: Ignore warnings about conflicting switches. * pr39839.c: Likewise. * pr40657-2.c: Likewise. * pr40956.c: Likewise. * pr41679.c: Likewise. * pr42235.c: Likewise. * pr42495.c: Likewise. * pr42505.c: Likewise. * pr42574.c: Likewise. * pr46883.c: Likewise. * pr46934.c: Likewise. * xor-and.c: Likewise. Index: mla-1.c =================================================================== --- mla-1.c (revision 174920) +++ mla-1.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -march=armv5te" } */ +/* { dg-prune-output "switch .* conflicts with" } */ int Index: pr39839.c =================================================================== --- pr39839.c (revision 174920) +++ pr39839.c (working copy) @@ -1,5 +1,6 @@ /* { dg-options "-mthumb -Os -march=armv5te -mthumb-interwork -fpic" } */ /* { dg-require-effective-target arm_thumb1_ok } */ +/* { dg-prune-output "switch .* conflicts with" } */ /* { dg-final { scan-assembler-not "str\[\\t \]*r.,\[\\t \]*.sp," } } */ struct S Index: pr40657-2.c =================================================================== --- pr40657-2.c (revision 174920) +++ pr40657-2.c (working copy) @@ -1,5 +1,6 @@ /* { dg-options "-Os -march=armv4t -mthumb" } */ /* { dg-require-effective-target arm_thumb1_ok } */ +/* { dg-prune-output "switch .* conflicts with" } */ /* { dg-final { scan-assembler-not "sub\[\\t \]*sp,\[\\t \]*sp" } } */ /* { dg-final { scan-assembler-not "add\[\\t \]*sp,\[\\t \]*sp" } } */ Index: pr40956.c =================================================================== --- pr40956.c (revision 174920) +++ pr40956.c (working copy) @@ -1,6 +1,7 @@ /* { dg-options "-mthumb -Os -fpic -march=armv5te" } */ /* { dg-require-effective-target arm_thumb1_ok } */ /* { dg-require-effective-target fpic } */ +/* { dg-prune-output "switch .* conflicts with" } */ /* Make sure the constant "0" is loaded into register only once. */ /* { dg-final { scan-assembler-times "mov\[\\t \]*r., #0" 1 } } */ Index: pr41679.c =================================================================== --- pr41679.c (revision 174920) +++ pr41679.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-march=armv5te -g -O2" } */ +/* { dg-prune-output "switch .* conflicts with" } */ extern int a; extern char b; Index: pr42235.c =================================================================== --- pr42235.c (revision 174920) +++ pr42235.c (working copy) @@ -1,5 +1,6 @@ /* { dg-options "-mthumb -O2 -march=armv5te" } */ /* { dg-require-effective-target arm_thumb1_ok } */ +/* { dg-prune-output "switch .* conflicts with" } */ /* { dg-final { scan-assembler-not "add\[\\t \]*r.,\[\\t \]*r.,\[\\t \]*\#1" } } */ /* { dg-final { scan-assembler-not "add\[\\t \]*r.,\[\\t \]*\#1" } } */ Index: pr42495.c =================================================================== --- pr42495.c (revision 174920) +++ pr42495.c (working copy) @@ -1,6 +1,7 @@ /* { dg-options "-mthumb -Os -fpic -march=armv5te -fdump-rtl-hoist" } */ /* { dg-require-effective-target arm_thumb1_ok } */ /* { dg-require-effective-target fpic } */ +/* { dg-prune-output "switch .* conflicts with" } */ /* Make sure all calculations of gObj's address get hoisted to one location. */ /* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" } } */ Index: pr42505.c =================================================================== --- pr42505.c (revision 174920) +++ pr42505.c (working copy) @@ -1,5 +1,6 @@ /* { dg-options "-mthumb -Os -march=armv5te" } */ /* { dg-require-effective-target arm_thumb1_ok } */ +/* { dg-prune-output "switch .* conflicts with" } */ /* { dg-final { scan-assembler-not "str\[\\t \]*r.,\[\\t \]*.sp," } } */ struct A { Index: pr42574.c =================================================================== --- pr42574.c (revision 174920) +++ pr42574.c (working copy) @@ -1,6 +1,7 @@ /* { dg-options "-mthumb -Os -fpic -march=armv5te" } */ /* { dg-require-effective-target arm_thumb1_ok } */ /* { dg-require-effective-target fpic } */ +/* { dg-prune-output "switch .* conflicts with" } */ /* Make sure the address of glob.c is calculated only once and using a logical shift for the offset (200<<1). */ /* { dg-final { scan-assembler-times "lsl" 1 } } */ Index: pr46883.c =================================================================== --- pr46883.c (revision 174920) +++ pr46883.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O1 -march=armv5te" } */ +/* { dg-prune-output "switch .* conflicts with" } */ void bar (unsigned char *q, unsigned short *data16s, int len) { Index: pr46934.c =================================================================== --- pr46934.c (revision 174920) +++ pr46934.c (working copy) @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-march=armv5te -mthumb -Os" } */ /* { dg-require-effective-target arm_thumb1_ok } */ +/* { dg-prune-output "switch .* conflicts with" } */ int caller (unsigned int reg_type) { Index: xor-and.c =================================================================== --- xor-and.c (revision 174920) +++ xor-and.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O -march=armv6" } */ +/* { dg-prune-output "switch .* conflicts with" } */ unsigned short foo (unsigned short x) {