Hi all, The gcc.target/aarch64/cpu-diagnostics* tests specify invalid -mcpu options and look for the expected error. However, if the user overrides the -mcpu option when testing the tests start FAILing because they don't get the expected bad -mcpu option.
This patch skips those tests when that happens. That way when testing with /-mcpu=<something> the tests appear UNSUPPORTED rather than FAIL. Ok for trunk? Thanks, Kyrill 2016-05-16 Kyrylo Tkachov <kyrylo.tkac...@arm.com> * gcc.target/aarch64/cpu-diagnostics-1.c: Skip if -mcpu is overriden. * gcc.target/aarch64/cpu-diagnostics-2.c: Likewise. * gcc.target/aarch64/cpu-diagnostics-3.c: Likewise. * gcc.target/aarch64/cpu-diagnostics-4.c: Likewise.
diff --git a/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-1.c b/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-1.c index de6b8a7da4d4d2500e5191dbbd925fab2d0afdb8..ddba65544710d35510cd73bcab083fc088148526 100644 --- a/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-1.c +++ b/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-1.c @@ -1,4 +1,5 @@ /* { dg-error "unknown" "" {target "aarch64*-*-*" } } */ +/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" } { "" } } */ /* { dg-options "-O2 -mcpu=dummy" } */ void f () diff --git a/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-2.c b/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-2.c index 2ca006598ff84cf0b92f229e72f83750d4c5e91f..ae42436031b07af709f754f24ef63fff1ce9b34c 100644 --- a/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-2.c +++ b/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-2.c @@ -1,4 +1,5 @@ /* { dg-error "missing" "" {target "aarch64*-*-*" } } */ +/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" } { "" } } */ /* { dg-options "-O2 -mcpu=cortex-a53+no" } */ void f () diff --git a/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-3.c b/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-3.c index 807e3253e30637f73613cdd184dc79bb6f24e7dc..8bc6e2fe0492e4518cdbea47fa63315a2fd83bac 100644 --- a/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-3.c +++ b/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-3.c @@ -1,4 +1,5 @@ /* { dg-error "invalid feature" "" {target "aarch64*-*-*" } } */ +/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" } { "" } } */ /* { dg-options "-O2 -mcpu=cortex-a53+dummy" } */ void f () diff --git a/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-4.c b/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-4.c index 4c246eb0172b16f9bad8b914b0bd0addd44edfe4..58355b42f84040386eef97dbe09ed99a0091923c 100644 --- a/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-4.c +++ b/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-4.c @@ -1,4 +1,5 @@ /* { dg-error "missing" "" {target "aarch64*-*-*" } } */ +/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" } { "" } } */ /* { dg-options "-O2 -mcpu=+dummy" } */ void f ()