blob: 81f876ee625890af680e1fed3a7e367c2ae3dbcb [file] [log] [blame]
/* { dg-do compile } */
/* Verify that atomic op mappings match Table A.6's recommended mapping. */
/* { dg-options "-O3" } */
/* { dg-add-options riscv_a } */
/* { dg-skip-if "" { *-*-* } { "-g" "-flto"} } */
/* { dg-final { check-function-bodies "**" "" } } */
/*
** foo:
** amoadd\.w\.aqrl\tzero,a1,0\(a0\)
** ret
*/
void foo (int* bar, int* baz)
{
__atomic_add_fetch(bar, baz, __ATOMIC_SEQ_CST);
}