1 /* Test __atomic routines for existence and execution with each valid
2    memory model.  */
3 /* { dg-do run } */
4 /* { dg-require-effective-target sync_char_short } */
5 
6 
7 /* Test that __atomic_{thread,signal}_fence builtins execute.  */
8 
9 int
main()10 main ()
11 {
12   __atomic_thread_fence (__ATOMIC_RELAXED);
13   __atomic_thread_fence (__ATOMIC_CONSUME);
14   __atomic_thread_fence (__ATOMIC_ACQUIRE);
15   __atomic_thread_fence (__ATOMIC_RELEASE);
16   __atomic_thread_fence (__ATOMIC_ACQ_REL);
17   __atomic_thread_fence (__ATOMIC_SEQ_CST);
18 
19   __atomic_signal_fence (__ATOMIC_RELAXED);
20   __atomic_signal_fence (__ATOMIC_CONSUME);
21   __atomic_signal_fence (__ATOMIC_ACQUIRE);
22   __atomic_signal_fence (__ATOMIC_RELEASE);
23   __atomic_signal_fence (__ATOMIC_ACQ_REL);
24   __atomic_signal_fence (__ATOMIC_SEQ_CST);
25 
26   return 0;
27 }
28 
29