Handle peeling for alignment with masking
[official-gcc.git] / gcc / testsuite / gcc.dg / pr48784-1.c
blob436d8c5518b454f7f580b37910ea84995acd06dc
1 /* { dg-do run } */
2 /* { dg-require-effective-target size32plus } */
3 /* { dg-options "-fstrict-volatile-bitfields" } */
5 extern void abort (void);
7 #pragma pack(1)
8 volatile struct S0 {
9 signed a : 7;
10 unsigned b : 28; /* b can't be fetched with an aligned 32-bit access, */
11 /* but it certainly can be fetched with an unaligned access */
12 } g = {0,0xfffffff};
14 int main() {
15 unsigned b = g.b;
16 if (b != 0xfffffff)
17 abort ();
18 return 0;