| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-fstrict-volatile-bitfields" } */ |
| 3 |
|
| 4 |
extern void abort(void); |
| 5 |
struct thing { |
| 6 |
volatile unsigned short a: 8; |
| 7 |
volatile unsigned short b: 8; |
| 8 |
} t = {1,2}; |
| 9 |
|
| 10 |
int main() |
| 11 |
{ |
| 12 |
t.a = 3; |
| 13 |
if (t.a !=3 || t.b !=2) abort(); |
| 14 |
return 0; |
| 15 |
} |