./:
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / 20050721-1.c
blob25a781ddd5ade331660586d4b59bc65e39b7ee23
1 /* Test for PR target/20191. */
3 struct S1;
5 struct S1 {
6 struct S1 *next;
7 float x;
8 };
10 struct S2 {
11 float y;
14 extern int func_ex1 (float);
16 extern int f;
17 extern float n;
18 extern struct S1 *bp1;
19 extern struct S2 *bp2;
21 inline float
22 func1 (int f, struct S2 *p2)
24 float a;
26 if (f)
27 a = n >= p2->y ? n : p2->y;
28 else
29 a = n;
30 return a;
33 inline float
34 func2 (struct S1 *p1, struct S2 *p2)
36 float a, b;
38 if(n <= 1.0)
39 b = func1 (f, p2);
40 else
42 a = n <= p1->x ? 0.0 : p1->x;
43 b = a >= p2->y ? a : p2->y;
45 return(b);
48 void
49 func3 (struct S1 *p)
51 float a = 0.0;
53 if (f)
54 a = func2 (bp1, bp2);
55 if (func_ex1 (a))
56 bp1 = p;