aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/atomic/stdatomic-kill-dep.c
blob: fda7fe7d1f0a45e61e38abe53686a041058f08e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* Test atomic_kill_dependency.  */
/* { dg-do run } */
/* { dg-options "-std=c11 -pedantic-errors" } */

#include <stdatomic.h>

extern void abort (void);

_Atomic int a = ATOMIC_VAR_INIT (1), b;

int
main ()
{
  b = kill_dependency (a);
  if (b != 1)
    abort ();

  return 0;
}