blob: 75abd5d3dfbde75fa7ef34cede118b01c0eaae14 [file] [log] [blame]
/* { dg-do compile } */
/* Verify that compare exchange mappings match the Ztso suggested mapping. */
/* { dg-add-options riscv_a } */
/* { dg-add-options riscv_ztso } */
/* { dg-final { scan-assembler-times "lr.w\t" 1 } } */
/* { dg-final { scan-assembler-times "sc.w\t" 1 } } */
void foo (int bar, int baz, int qux)
{
__atomic_compare_exchange_n(&bar, &baz, qux, 1, __ATOMIC_RELEASE, __ATOMIC_ACQUIRE);
}