2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / opt / reload2.C
blob1af8aea6559b7907ceb1d696d38df8c4b1d9b2bf
1 // PR 10352
2 // { dg-do compile }
3 // { dg-options -O2 }
5 extern double fabs(double x);
7 typedef struct { float x, y; } S;
8 typedef struct _T T;
10 extern void fT( T *p );
11 extern T *h();
12 extern S g( );
14 static
15 int f(void)
17     T *t=0;
18     int c=0;
19     S s;
21     const S exp_s = {0.,0.};
23     if(!(t = h()))
24     {
25         c++;
26     }
28     if(!c)
29     {
30         s = g();
31         if( (fabs( (s.x) - (exp_s.x) ) > 1 )
32             || (fabs( (s.y) - (exp_s.y) ) > 1 ) )
33         {
34             c++;
35         }
36     }
38     if(t)
39         fT(t);
41     return c;