blob: 969cbf9c084f0dcc626a2d5839c02d3734005e73 [file] [log] [blame]
/* PR middle-end/88968 */
/* { dg-do compile } */
struct __attribute__((packed)) S {
unsigned int a : 16;
unsigned int b : 1;
} s;
void
f1 (void)
{
#pragma omp atomic
++s.a;
}
int
f2 (void)
{
int r;
#pragma omp atomic capture
{
r = s.a;
s.a = 0;
}
return r;
}
int
f3 (void)
{
int r;
#pragma omp atomic capture
{
r = s.a;
s.a = s.a + 32;
}
return r;
}
int
f4 (void)
{
int r;
#pragma omp atomic capture
r = s.a = s.a + 32;
return r;
}