1 /* { dg-do compile { target ia64-*-* } } */
2 /* { dg-options "-O2 -finline-functions" } */
4 /* Test inlining __sync_bool_compare_and_swap_di. */
7 #include <ia64intrin.h>
10 compare_and_swap(long *addr, long old, long new_val)
12 return __sync_bool_compare_and_swap_di(addr, old, new_val);
18 long he_address = *address & ~1;
19 while (!compare_and_swap(address, he_address, he_address | 1))
20 he_address = *address & ~1;