1 /* PR debug/44223 */
2 /* { dg-do compile { target fpic } } */
3 /* { dg-options "-O3 -fsched-pressure -fschedule-insns -fpic -march=core2 -g" } */
4 
5 struct S { unsigned int s1; int s2; };
6 struct T { int t; };
7 
8 extern void extfn (struct S *);
9 
10 static inline void
foo(struct S * s,unsigned char * x,int y)11 foo (struct S *s, unsigned char *x, int y)
12 {
13   s->s2 = 32;
14 }
15 
16 static inline void
bar(struct S * s,int n,unsigned int x)17 bar (struct S *s, int n, unsigned int x)
18 {
19   unsigned int s1;
20   int s2;
21   s1 = s->s1;
22   s2 = s->s2;
23   if (n < s2)
24     s1 = (s1 << n) | x;
25   s->s1 = s1;
26 }
27 
28 int
baz(struct T * u,unsigned char * v,int w)29 baz (struct T *u, unsigned char *v, int w)
30 {
31   struct S y;
32   foo (&y, v, 7);
33   bar (&y, 12, 0xfff);
34   bar (&y, 2, u->t);
35   extfn (&y);
36 }
37