1 /*  PR rtl-optimization/16536
2     Origin:  Jeremy Denise      <jeremy.denise@libertysurf.fr>
3     Reduced: Wolfgang Bangerth  <bangerth@dealii.org>
4              Volker Reichelt    <reichelt@igpm.rwth-aachen.de>  */
5 /* { dg-options "-fgnu89-inline" } */
6 
7 extern void abort ();
8 
9 typedef struct
10 {
11   int i, dummy;
12 } A;
13 
foo(const A * p,const A * q)14 inline A foo (const A* p, const A* q)
15 {
16   return (A){p->i+q->i};
17 }
18 
bar(A * __restrict__ p)19 void bar (A* __restrict__ p)
20 {
21   *p=foo(p,p);
22   if (p->i!=2)
23     abort();
24 }
25 
main()26 int main ()
27 {
28   A a={1};
29   bar(&a);
30   return 0;
31 }
32