PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / volatile-bitfields-1.c
blob6adda27fea4c07beae39b36789bd675064d8963d
1 /* { dg-options "-fstrict-volatile-bitfields" } */
2 /* { dg-do run } */
4 extern int puts(const char *);
5 extern void abort(void) __attribute__((noreturn));
7 typedef struct {
8 volatile unsigned short a:8, b:8;
9 } BitStruct;
11 BitStruct bits = {1, 2};
13 void check(int i, int j)
15 if (i != 1 || j != 2) puts("FAIL"), abort();
18 int main ()
20 check(bits.a, bits.b);
22 return 0;