1 /* Verify that we do not IPA-SRA bitfields.  */
2 /* { dg-do run } */
3 /* { dg-options "-O2"  } */
4 /* { dg-require-effective-target int32plus } */
5 
6 extern void abort (void);
7 
8 struct S
9 {
10   int j : 8;
11   int i : 24;
12   int l;
13 };
14 
foo(struct S * s)15 static int __attribute__((noinline)) foo (struct S *s)
16 {
17   int z = s->i;
18   if (z != 777)
19     abort ();
20   return 0;
21 }
22 
bar(struct S * s)23 int __attribute__((noinline)) bar (struct S *s)
24 {
25   return foo (s);
26 }
27 
main(int argc,char * argv[])28 int main (int argc, char *argv[])
29 {
30   struct S s;
31   s.j = 5;
32   s.i = 777;
33   s.l = -1;
34 
35   return bar (&s);
36 }
37