| 1 |
// PR c++/90947 |
| 2 |
// { dg-do run { target c++11 } } |
| 3 |
// { dg-require-effective-target thread_fence } |
| 4 |
// { dg-require-effective-target sync_int_long } |
| 5 |
|
| 6 |
#include <atomic> |
| 7 |
|
| 8 |
static std::atomic<int> a[1] { {1} }; |
| 9 |
|
| 10 |
int |
| 11 |
main () |
| 12 |
{ |
| 13 |
if (a[0].load () != 1) |
| 14 |
__builtin_abort (); |
| 15 |
} |