blob: 499761fdbfd0d70ff36b2c7ab68e838352cb1111 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
/* { dg-do compile } */
/* { dg-options "-O2" } */
#include <stdatomic.h>
int
tbit0 (_Atomic int* a, int n)
{
#define BIT (0x1 << n)
return atomic_fetch_or (a, BIT) & BIT;
#undef BIT
}
|