As the test directives section of the GCC internals manual says: The order in which test directives appear in a test can be important: directives local to GCC sometimes override information used by the DejaGnu directives, which know nothing about the GCC directives, so the DejaGnu directives must precede GCC directives.
This patch fixes several tests in gcc.target/arm to move dg-do to before dg-require-effective-target so the test will be skipped as expected. Tested with several sets of flags with arm-none-eabi, checked in as obvious. Janis
2013-08-14 Janis Johnson <jani...@codesourcery.com> * gcc.target/arm/atomic-comp-swap-release-acquire.c: Move dg-do to be the first test directive. * gcc.target/arm/atomic-op-acq_rel.c: Likewise. * gcc.target/arm/atomic-op-acquire.c: Likewise. * gcc.target/arm/atomic-op-char.c: Likewise. * gcc.target/arm/atomic-op-consume.c: Likewise. * gcc.target/arm/atomic-op-int.c: Likewise. * gcc.target/arm/atomic-op-relaxed.c: Likewise. * gcc.target/arm/atomic-op-release.c: Likewise. * gcc.target/arm/atomic-op-seq_cst.c: Likewise. * gcc.target/arm/atomic-op-short.c: Likewise. Index: testsuite/gcc.target/arm/atomic-comp-swap-release-acquire.c =================================================================== --- testsuite/gcc.target/arm/atomic-comp-swap-release-acquire.c (revision 201513) +++ testsuite/gcc.target/arm/atomic-comp-swap-release-acquire.c (working copy) @@ -1,5 +1,5 @@ +/* { dg-do compile } */ /* { dg-require-effective-target arm_arch_v8a_ok } */ -/* { dg-do compile } */ /* { dg-options "-O2" } */ /* { dg-add-options arm_arch_v8a } */ Index: testsuite/gcc.target/arm/atomic-op-acq_rel.c =================================================================== --- testsuite/gcc.target/arm/atomic-op-acq_rel.c (revision 201513) +++ testsuite/gcc.target/arm/atomic-op-acq_rel.c (working copy) @@ -1,5 +1,5 @@ +/* { dg-do compile } */ /* { dg-require-effective-target arm_arch_v8a_ok } */ -/* { dg-do compile } */ /* { dg-options "-O2" } */ /* { dg-add-options arm_arch_v8a } */ Index: testsuite/gcc.target/arm/atomic-op-acquire.c =================================================================== --- testsuite/gcc.target/arm/atomic-op-acquire.c (revision 201513) +++ testsuite/gcc.target/arm/atomic-op-acquire.c (working copy) @@ -1,5 +1,5 @@ +/* { dg-do compile } */ /* { dg-require-effective-target arm_arch_v8a_ok } */ -/* { dg-do compile } */ /* { dg-options "-O2" } */ /* { dg-add-options arm_arch_v8a } */ Index: testsuite/gcc.target/arm/atomic-op-char.c =================================================================== --- testsuite/gcc.target/arm/atomic-op-char.c (revision 201513) +++ testsuite/gcc.target/arm/atomic-op-char.c (working copy) @@ -1,5 +1,5 @@ +/* { dg-do compile } */ /* { dg-require-effective-target arm_arch_v8a_ok } */ -/* { dg-do compile } */ /* { dg-options "-O2" } */ /* { dg-add-options arm_arch_v8a } */ Index: testsuite/gcc.target/arm/atomic-op-consume.c =================================================================== --- testsuite/gcc.target/arm/atomic-op-consume.c (revision 201513) +++ testsuite/gcc.target/arm/atomic-op-consume.c (working copy) @@ -1,5 +1,5 @@ +/* { dg-do compile } */ /* { dg-require-effective-target arm_arch_v8a_ok } */ -/* { dg-do compile } */ /* { dg-options "-O2" } */ /* { dg-add-options arm_arch_v8a } */ Index: testsuite/gcc.target/arm/atomic-op-int.c =================================================================== --- testsuite/gcc.target/arm/atomic-op-int.c (revision 201513) +++ testsuite/gcc.target/arm/atomic-op-int.c (working copy) @@ -1,5 +1,5 @@ +/* { dg-do compile } */ /* { dg-require-effective-target arm_arch_v8a_ok } */ -/* { dg-do compile } */ /* { dg-options "-O2" } */ /* { dg-add-options arm_arch_v8a } */ Index: testsuite/gcc.target/arm/atomic-op-relaxed.c =================================================================== --- testsuite/gcc.target/arm/atomic-op-relaxed.c (revision 201513) +++ testsuite/gcc.target/arm/atomic-op-relaxed.c (working copy) @@ -1,5 +1,5 @@ +/* { dg-do compile } */ /* { dg-require-effective-target arm_arch_v8a_ok } */ -/* { dg-do compile } */ /* { dg-options "-O2" } */ /* { dg-add-options arm_arch_v8a } */ Index: testsuite/gcc.target/arm/atomic-op-release.c =================================================================== --- testsuite/gcc.target/arm/atomic-op-release.c (revision 201513) +++ testsuite/gcc.target/arm/atomic-op-release.c (working copy) @@ -1,5 +1,5 @@ +/* { dg-do compile } */ /* { dg-require-effective-target arm_arch_v8a_ok } */ -/* { dg-do compile } */ /* { dg-options "-O2" } */ /* { dg-add-options arm_arch_v8a } */ Index: testsuite/gcc.target/arm/atomic-op-seq_cst.c =================================================================== --- testsuite/gcc.target/arm/atomic-op-seq_cst.c (revision 201513) +++ testsuite/gcc.target/arm/atomic-op-seq_cst.c (working copy) @@ -1,5 +1,5 @@ +/* { dg-do compile } */ /* { dg-require-effective-target arm_arch_v8a_ok } */ -/* { dg-do compile } */ /* { dg-options "-O2" } */ /* { dg-add-options arm_arch_v8a } */ Index: testsuite/gcc.target/arm/atomic-op-short.c =================================================================== --- testsuite/gcc.target/arm/atomic-op-short.c (revision 201513) +++ testsuite/gcc.target/arm/atomic-op-short.c (working copy) @@ -1,5 +1,5 @@ +/* { dg-do compile } */ /* { dg-require-effective-target arm_arch_v8a_ok } */ -/* { dg-do compile } */ /* { dg-options "-O2" } */ /* { dg-add-options arm_arch_v8a } */