* gcc.c-torture/compile/20000120-2.c: Use -fgnu89-inline.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / restrict-1.c
blobc55286152376d1f00a7f23af60ff9fecd28605a5
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" } */
7 extern void abort ();
9 typedef struct
11 int i, dummy;
12 } A;
14 inline A foo (const A* p, const A* q)
16 return (A){p->i+q->i};
19 void bar (A* __restrict__ p)
21 *p=foo(p,p);
22 if (p->i!=2)
23 abort();
26 int main ()
28 A a={1};
29 bar(&a);
30 return 0;