Hi All, This patch adds the needed 'dg-require-effective-target sync_*' lines to some of the atomic tests so that they will not be run if the appropriate atomic support is not available.
OK for trunk? 2013-06-12 Meador Inge <mead...@codesourcery.com> * gcc.dg/atomic-flag.c: Add dg-require-effective-target sync_*. * g++.dg/simulate-thread/atomics-2.C: Likewise. * g++.dg/simulate-thread/atomics-1.C: Likewise.
Index: gcc/testsuite/gcc.dg/atomic-flag.c =================================================================== --- gcc/testsuite/gcc.dg/atomic-flag.c (revision 199961) +++ gcc/testsuite/gcc.dg/atomic-flag.c (working copy) @@ -1,5 +1,6 @@ /* Test __atomic routines for existence and execution. */ /* { dg-do run } */ +/* { dg-require-effective-target sync_char_short } */ /* Test that __atomic_test_and_set and __atomic_clear builtins execute. */ Index: gcc/testsuite/g++.dg/simulate-thread/atomics-2.C =================================================================== --- gcc/testsuite/g++.dg/simulate-thread/atomics-2.C (revision 199961) +++ gcc/testsuite/g++.dg/simulate-thread/atomics-2.C (working copy) @@ -1,6 +1,7 @@ /* { dg-do link } */ /* { dg-options "-std=c++0x" } */ /* { dg-final { simulate-thread } } */ +/* { dg-require-effective-target sync_int_long } */ using namespace std; Index: gcc/testsuite/g++.dg/simulate-thread/atomics-1.C =================================================================== --- gcc/testsuite/g++.dg/simulate-thread/atomics-1.C (revision 199961) +++ gcc/testsuite/g++.dg/simulate-thread/atomics-1.C (working copy) @@ -1,6 +1,8 @@ /* { dg-do link } */ /* { dg-options "-std=c++0x" } */ /* { dg-final { simulate-thread } } */ +/* { dg-require-effective-target sync_char_short } */ +/* { dg-require-effective-target sync_int_long } */ /* Test that atomic int and atomic char work properly. */