summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/sync-3.C
blob: 99faac7bc55d5f242457be0eaeda2df79454c3f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// PR debug/41801
// { dg-do compile }
// { dg-options "-O2 -g" }

struct T
{
  void
  foo () volatile
  {
    __sync_lock_release (&t);
    __sync_synchronize ();
  }
  bool t;
};

int
main ()
{
  T t = { false };
  t.foo ();
}