summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c/atomic-6.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp/testsuite/libgomp.c/atomic-6.c')
-rw-r--r--libgomp/testsuite/libgomp.c/atomic-6.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libgomp/testsuite/libgomp.c/atomic-6.c b/libgomp/testsuite/libgomp.c/atomic-6.c
index 8e7fca59600..59baf7dd3e2 100644
--- a/libgomp/testsuite/libgomp.c/atomic-6.c
+++ b/libgomp/testsuite/libgomp.c/atomic-6.c
@@ -4,7 +4,7 @@
/* { dg-options "-O2 -march=i586" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
#ifdef __i386__
-# include "../../../gcc/config/i386/cpuid.h"
+# include "cpuid.h"
#endif
extern void abort (void);
@@ -28,10 +28,11 @@ main (void)
if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
return 0;
- if (edx & bit_CMPXCHG8B)
- do_test ();
-#else
- do_test ();
+ if (!(edx & bit_CMPXCHG8B))
+ return 0;
#endif
+
+ do_test ();
+
return 0;
}