struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-restrict-1.c
blob80e3f9531e64e88bd15ff2ccfb52e6968b247fcb
1 /*
2 restrict-1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 /* PR rtl-optimization/16536
8 Origin: Jeremy Denise <jeremy.denise@libertysurf.fr>
9 Reduced: Wolfgang Bangerth <bangerth@dealii.org>
10 Volker Reichelt <reichelt@igpm.rwth-aachen.de> */
11 /* { dg-options "-fgnu89-inline" } */
13 typedef struct
15 int i, dummy;
16 } A;
17 #if 0 // TODO: Enable when compound literals are supported
18 inline A foo (const A* p, const A* q)
20 return (A){p->i+q->i};
23 void bar (A* __restrict__ p)
25 *p=foo(p,p);
26 if (p->i!=2)
27 abort();
29 #endif
30 void
31 testTortureExecute (void)
33 #if 0 // TODO: Enable when compound literals are supported
34 A a={1};
35 bar(&a);
36 return 0;
37 #endif