Commit a2ca7c8c by Joseph Myers Committed by Joseph Myers

atomic-compare-exchange-1.c, [...]: Declare main as returning int.

	* testsuite/libatomic.c/atomic-compare-exchange-1.c,
	testsuite/libatomic.c/atomic-compare-exchange-2.c,
	testsuite/libatomic.c/atomic-compare-exchange-3.c,
	testsuite/libatomic.c/atomic-compare-exchange-4.c,
	testsuite/libatomic.c/atomic-compare-exchange-5.c,
	testsuite/libatomic.c/atomic-exchange-1.c,
	testsuite/libatomic.c/atomic-exchange-2.c,
	testsuite/libatomic.c/atomic-exchange-3.c,
	testsuite/libatomic.c/atomic-exchange-4.c,
	testsuite/libatomic.c/atomic-exchange-5.c,
	testsuite/libatomic.c/atomic-generic.c,
	testsuite/libatomic.c/atomic-load-1.c,
	testsuite/libatomic.c/atomic-load-2.c,
	testsuite/libatomic.c/atomic-load-3.c,
	testsuite/libatomic.c/atomic-load-4.c,
	testsuite/libatomic.c/atomic-load-5.c,
	testsuite/libatomic.c/atomic-op-1.c,
	testsuite/libatomic.c/atomic-op-2.c,
	testsuite/libatomic.c/atomic-op-3.c,
	testsuite/libatomic.c/atomic-op-4.c,
	testsuite/libatomic.c/atomic-op-5.c,
	testsuite/libatomic.c/atomic-store-1.c,
	testsuite/libatomic.c/atomic-store-2.c,
	testsuite/libatomic.c/atomic-store-3.c,
	testsuite/libatomic.c/atomic-store-4.c,
	testsuite/libatomic.c/atomic-store-5.c: Declare main as returning
	int.  Do not require built-in sync support or add target-specific
	options.
	* testsuite/libatomic.c/atomic-exchange-1.c,
	testsuite/libatomic.c/atomic-exchange-2.c,
	testsuite/libatomic.c/atomic-exchange-3.c,
	testsuite/libatomic.c/atomic-exchange-4.c,
	testsuite/libatomic.c/atomic-exchange-5.c: Separate increments of
	count from expression using value of count.

From-SVN: r204953
parent ad098ad1
2013-11-18 Joseph Myers <joseph@codesourcery.com>
* testsuite/libatomic.c/atomic-compare-exchange-1.c,
testsuite/libatomic.c/atomic-compare-exchange-2.c,
testsuite/libatomic.c/atomic-compare-exchange-3.c,
testsuite/libatomic.c/atomic-compare-exchange-4.c,
testsuite/libatomic.c/atomic-compare-exchange-5.c,
testsuite/libatomic.c/atomic-exchange-1.c,
testsuite/libatomic.c/atomic-exchange-2.c,
testsuite/libatomic.c/atomic-exchange-3.c,
testsuite/libatomic.c/atomic-exchange-4.c,
testsuite/libatomic.c/atomic-exchange-5.c,
testsuite/libatomic.c/atomic-generic.c,
testsuite/libatomic.c/atomic-load-1.c,
testsuite/libatomic.c/atomic-load-2.c,
testsuite/libatomic.c/atomic-load-3.c,
testsuite/libatomic.c/atomic-load-4.c,
testsuite/libatomic.c/atomic-load-5.c,
testsuite/libatomic.c/atomic-op-1.c,
testsuite/libatomic.c/atomic-op-2.c,
testsuite/libatomic.c/atomic-op-3.c,
testsuite/libatomic.c/atomic-op-4.c,
testsuite/libatomic.c/atomic-op-5.c,
testsuite/libatomic.c/atomic-store-1.c,
testsuite/libatomic.c/atomic-store-2.c,
testsuite/libatomic.c/atomic-store-3.c,
testsuite/libatomic.c/atomic-store-4.c,
testsuite/libatomic.c/atomic-store-5.c: Declare main as returning
int. Do not require built-in sync support or add target-specific
options.
* testsuite/libatomic.c/atomic-exchange-1.c,
testsuite/libatomic.c/atomic-exchange-2.c,
testsuite/libatomic.c/atomic-exchange-3.c,
testsuite/libatomic.c/atomic-exchange-4.c,
testsuite/libatomic.c/atomic-exchange-5.c: Separate increments of
count from expression using value of count.
2013-11-10 Uros Bizjak <ubizjak@gmail.com> 2013-11-10 Uros Bizjak <ubizjak@gmail.com>
* config/x86/fenv.c: New file. * config/x86/fenv.c: New file.
......
/* Test __atomic routines for existence and proper execution on 1 byte /* Test __atomic routines for existence and proper execution on 1 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_compare_exchange_n builtin for a char. */ /* Test the execution of the __atomic_compare_exchange_n builtin for a char. */
...@@ -16,6 +15,7 @@ char zero = 0; ...@@ -16,6 +15,7 @@ char zero = 0;
#define STRONG 0 #define STRONG 0
#define WEAK 1 #define WEAK 1
int
main () main ()
{ {
......
/* Test __atomic routines for existence and proper execution on 2 byte /* Test __atomic routines for existence and proper execution on 2 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_compare_exchange_n builtin for a short. */ /* Test the execution of the __atomic_compare_exchange_n builtin for a short. */
...@@ -16,6 +15,7 @@ short zero = 0; ...@@ -16,6 +15,7 @@ short zero = 0;
#define STRONG 0 #define STRONG 0
#define WEAK 1 #define WEAK 1
int
main () main ()
{ {
......
/* Test __atomic routines for existence and proper execution on 4 byte /* Test __atomic routines for existence and proper execution on 4 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_int_long } */
/* Test the execution of the __atomic_compare_exchange_n builtin for an int. */ /* Test the execution of the __atomic_compare_exchange_n builtin for an int. */
...@@ -16,6 +15,7 @@ int zero = 0; ...@@ -16,6 +15,7 @@ int zero = 0;
#define STRONG 0 #define STRONG 0
#define WEAK 1 #define WEAK 1
int
main () main ()
{ {
......
/* Test __atomic routines for existence and proper execution on 8 byte /* Test __atomic routines for existence and proper execution on 8 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_long_long_runtime } */
/* { dg-options "" } */ /* { dg-options "" } */
/* { dg-options "-march=pentium" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
/* Test the execution of __atomic_compare_exchange_n builtin for a long_long. */ /* Test the execution of __atomic_compare_exchange_n builtin for a long_long. */
...@@ -18,6 +16,7 @@ long long zero = 0; ...@@ -18,6 +16,7 @@ long long zero = 0;
#define STRONG 0 #define STRONG 0
#define WEAK 1 #define WEAK 1
int
main () main ()
{ {
......
/* Test __atomic routines for existence and proper execution on 16 byte /* Test __atomic routines for existence and proper execution on 16 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_int_128_runtime } */ /* { dg-require-effective-target int128 } */
/* { dg-options "-mcx16" { target { i?86-*-* x86_64-*-* } } } */
/* Test the execution of __atomic_compare_exchange_n builtin for an int_128. */ /* Test the execution of __atomic_compare_exchange_n builtin for an int_128. */
...@@ -17,6 +16,7 @@ __int128_t zero = 0; ...@@ -17,6 +16,7 @@ __int128_t zero = 0;
#define STRONG 0 #define STRONG 0
#define WEAK 1 #define WEAK 1
int
main () main ()
{ {
......
/* Test __atomic routines for existence and proper execution on 1 byte /* Test __atomic routines for existence and proper execution on 1 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_exchange_n builtin for a char. */ /* Test the execution of the __atomic_exchange_n builtin for a char. */
...@@ -9,25 +8,31 @@ extern void abort(void); ...@@ -9,25 +8,31 @@ extern void abort(void);
char v, count, ret; char v, count, ret;
int
main () main ()
{ {
v = 0; v = 0;
count = 0; count = 0;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count)
abort (); abort ();
count++;
/* Now test the generic version. */ /* Now test the generic version. */
......
/* Test __atomic routines for existence and proper execution on 2 byte /* Test __atomic routines for existence and proper execution on 2 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_X builtin for a short. */ /* Test the execution of the __atomic_X builtin for a short. */
...@@ -9,25 +8,31 @@ extern void abort(void); ...@@ -9,25 +8,31 @@ extern void abort(void);
short v, count, ret; short v, count, ret;
int
main () main ()
{ {
v = 0; v = 0;
count = 0; count = 0;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count)
abort (); abort ();
count++;
/* Now test the generic version. */ /* Now test the generic version. */
......
/* Test __atomic routines for existence and proper execution on 4 byte /* Test __atomic routines for existence and proper execution on 4 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_int_long } */
/* Test the execution of the __atomic_X builtin for an int. */ /* Test the execution of the __atomic_X builtin for an int. */
...@@ -9,25 +8,31 @@ extern void abort(void); ...@@ -9,25 +8,31 @@ extern void abort(void);
int v, count, ret; int v, count, ret;
int
main () main ()
{ {
v = 0; v = 0;
count = 0; count = 0;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count)
abort (); abort ();
count++;
/* Now test the generic version. */ /* Now test the generic version. */
......
/* Test __atomic routines for existence and proper execution on 8 byte /* Test __atomic routines for existence and proper execution on 8 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_long_long_runtime } */
/* { dg-options "" } */ /* { dg-options "" } */
/* { dg-options "-march=pentium" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
/* Test the execution of the __atomic_X builtin for a long_long. */ /* Test the execution of the __atomic_X builtin for a long_long. */
...@@ -11,25 +9,31 @@ extern void abort(void); ...@@ -11,25 +9,31 @@ extern void abort(void);
long long v, count, ret; long long v, count, ret;
int
main () main ()
{ {
v = 0; v = 0;
count = 0; count = 0;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count)
abort (); abort ();
count++;
/* Now test the generic version. */ /* Now test the generic version. */
......
/* Test __atomic routines for existence and proper execution on 16 byte /* Test __atomic routines for existence and proper execution on 16 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_int_128_runtime } */ /* { dg-require-effective-target int128 } */
/* { dg-options "-mcx16" { target { i?86-*-* x86_64-*-* } } } */
/* Test the execution of the __atomic_X builtin for a 16 byte value. */ /* Test the execution of the __atomic_X builtin for a 16 byte value. */
...@@ -10,25 +9,31 @@ extern void abort(void); ...@@ -10,25 +9,31 @@ extern void abort(void);
__int128_t v, count, ret; __int128_t v, count, ret;
int
main () main ()
{ {
v = 0; v = 0;
count = 0; count = 0;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count)
abort (); abort ();
count++;
if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count++) if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count)
abort (); abort ();
count++;
/* Now test the generic version. */ /* Now test the generic version. */
......
...@@ -22,6 +22,7 @@ test_struct a,b; ...@@ -22,6 +22,7 @@ test_struct a,b;
int size = sizeof (test_struct); int size = sizeof (test_struct);
/* Test for consistency on sizes 1, 2, 4, 8, 16 and 32. */ /* Test for consistency on sizes 1, 2, 4, 8, 16 and 32. */
int
main () main ()
{ {
test_struct c; test_struct c;
......
/* Test __atomic routines for existence and proper execution on 1 byte /* Test __atomic routines for existence and proper execution on 1 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_load_n builtin for a char. */ /* Test the execution of the __atomic_load_n builtin for a char. */
...@@ -10,6 +9,7 @@ extern void abort(void); ...@@ -10,6 +9,7 @@ extern void abort(void);
char v, count; char v, count;
int
main () main ()
{ {
v = 0; v = 0;
......
/* Test __atomic routines for existence and proper execution on 2 byte /* Test __atomic routines for existence and proper execution on 2 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_load_n builtin for a short. */ /* Test the execution of the __atomic_load_n builtin for a short. */
...@@ -11,6 +10,7 @@ extern void abort(void); ...@@ -11,6 +10,7 @@ extern void abort(void);
short v, count; short v, count;
int
main () main ()
{ {
v = 0; v = 0;
......
/* Test __atomic routines for existence and proper execution on 4 byte /* Test __atomic routines for existence and proper execution on 4 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_int_long } */
extern void abort(void); extern void abort(void);
int v, count; int v, count;
int
main () main ()
{ {
v = 0; v = 0;
......
/* Test __atomic routines for existence and proper execution on 8 byte /* Test __atomic routines for existence and proper execution on 8 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_long_long_runtime } */
/* { dg-options "" } */ /* { dg-options "" } */
/* { dg-options "-march=pentium" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
extern void abort(void); extern void abort(void);
long long v, count; long long v, count;
int
main () main ()
{ {
v = 0; v = 0;
......
/* Test __atomic routines for existence and proper execution on 16 byte /* Test __atomic routines for existence and proper execution on 16 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_int_128_runtime } */ /* { dg-require-effective-target int128 } */
/* { dg-options "-mcx16" { target { i?86-*-* x86_64-*-* } } } */
extern void abort(void); extern void abort(void);
__int128_t v, count; __int128_t v, count;
int
main () main ()
{ {
v = 0; v = 0;
......
/* Test __atomic routines for existence and proper execution on 1 byte /* Test __atomic routines for existence and proper execution on 1 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_*OP builtin routines for a char. */ /* Test the execution of the __atomic_*OP builtin routines for a char. */
...@@ -527,6 +526,7 @@ test_or () ...@@ -527,6 +526,7 @@ test_or ()
abort (); abort ();
} }
int
main () main ()
{ {
test_fetch_add (); test_fetch_add ();
......
/* Test __atomic routines for existence and proper execution on 2 byte /* Test __atomic routines for existence and proper execution on 2 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_*OP builtin routines for a short. */ /* Test the execution of the __atomic_*OP builtin routines for a short. */
...@@ -528,6 +527,7 @@ test_or () ...@@ -528,6 +527,7 @@ test_or ()
abort (); abort ();
} }
int
main () main ()
{ {
test_fetch_add (); test_fetch_add ();
......
/* Test __atomic routines for existence and proper execution on 4 byte /* Test __atomic routines for existence and proper execution on 4 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_int_long } */
/* Test the execution of the __atomic_*OP builtin routines for an int. */ /* Test the execution of the __atomic_*OP builtin routines for an int. */
...@@ -527,6 +526,7 @@ test_or () ...@@ -527,6 +526,7 @@ test_or ()
abort (); abort ();
} }
int
main () main ()
{ {
test_fetch_add (); test_fetch_add ();
......
/* Test __atomic routines for existence and proper execution on 8 byte /* Test __atomic routines for existence and proper execution on 8 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_long_long_runtime } */
/* { dg-options "" } */ /* { dg-options "" } */
/* { dg-options "-march=pentium" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
/* Test the execution of the __atomic_*OP builtin routines for long long. */ /* Test the execution of the __atomic_*OP builtin routines for long long. */
...@@ -529,6 +527,7 @@ test_or () ...@@ -529,6 +527,7 @@ test_or ()
abort (); abort ();
} }
int
main () main ()
{ {
test_fetch_add (); test_fetch_add ();
......
/* Test __atomic routines for existence and proper execution on 16 byte /* Test __atomic routines for existence and proper execution on 16 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_int_128_runtime } */ /* { dg-require-effective-target int128 } */
/* { dg-options "-mcx16" { target { i?86-*-* x86_64-*-* } } } */
/* Test the execution of the __atomic_*OP builtin routines for an int_128. */ /* Test the execution of the __atomic_*OP builtin routines for an int_128. */
...@@ -528,6 +527,7 @@ test_or () ...@@ -528,6 +527,7 @@ test_or ()
abort (); abort ();
} }
int
main () main ()
{ {
test_fetch_add (); test_fetch_add ();
......
/* Test __atomic routines for existence and proper execution on 1 byte /* Test __atomic routines for existence and proper execution on 1 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_store_n builtin for a char. */ /* Test the execution of the __atomic_store_n builtin for a char. */
...@@ -9,6 +8,7 @@ extern void abort(void); ...@@ -9,6 +8,7 @@ extern void abort(void);
char v, count; char v, count;
int
main () main ()
{ {
v = 0; v = 0;
......
/* Test __atomic routines for existence and proper execution on 2 byte /* Test __atomic routines for existence and proper execution on 2 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_char_short } */
/* Test the execution of the __atomic_store_n builtin for a short. */ /* Test the execution of the __atomic_store_n builtin for a short. */
...@@ -9,6 +8,7 @@ extern void abort(void); ...@@ -9,6 +8,7 @@ extern void abort(void);
short v, count; short v, count;
int
main () main ()
{ {
v = 0; v = 0;
......
/* Test __atomic routines for existence and proper execution on 4 byte /* Test __atomic routines for existence and proper execution on 4 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_int_long } */
/* Test the execution of the __atomic_store_n builtin for an int. */ /* Test the execution of the __atomic_store_n builtin for an int. */
...@@ -9,6 +8,7 @@ extern void abort(void); ...@@ -9,6 +8,7 @@ extern void abort(void);
int v, count; int v, count;
int
main () main ()
{ {
v = 0; v = 0;
......
/* Test __atomic routines for existence and proper execution on 8 byte /* Test __atomic routines for existence and proper execution on 8 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_long_long_runtime } */
/* { dg-options "" } */ /* { dg-options "" } */
/* { dg-options "-march=pentium" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
/* Test the execution of the __atomic_store_n builtin for a long long. */ /* Test the execution of the __atomic_store_n builtin for a long long. */
...@@ -11,6 +9,7 @@ extern void abort(void); ...@@ -11,6 +9,7 @@ extern void abort(void);
long long v, count; long long v, count;
int
main () main ()
{ {
v = 0; v = 0;
......
/* Test __atomic routines for existence and proper execution on 16 byte /* Test __atomic routines for existence and proper execution on 16 byte
values with each valid memory model. */ values with each valid memory model. */
/* { dg-do run } */ /* { dg-do run } */
/* { dg-require-effective-target sync_int_128_runtime } */ /* { dg-require-effective-target int128 } */
/* { dg-options "-mcx16" { target { i?86-*-* x86_64-*-* } } } */
/* Test the execution of the __atomic_store_n builtin for a 16 byte value. */ /* Test the execution of the __atomic_store_n builtin for a 16 byte value. */
...@@ -10,6 +9,7 @@ extern void abort(void); ...@@ -10,6 +9,7 @@ extern void abort(void);
__int128_t v, count; __int128_t v, count;
int
main () main ()
{ {
v = 0; v = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment