1/* Test for PR target/20191. */ 2 3struct S1; 4 5struct S1 { 6 struct S1 *next; 7 float x; 8}; 9 10struct S2 { 11 float y; 12}; 13 14extern int func_ex1 (float); 15 16extern int f; 17extern float n; 18extern struct S1 *bp1; 19extern struct S2 *bp2; 20 21inline float 22func1 (int f, struct S2 *p2) 23{ 24 float a; 25 26 if (f) 27 a = n >= p2->y ? n : p2->y; 28 else 29 a = n; 30 return a; 31} 32 33inline float 34func2 (struct S1 *p1, struct S2 *p2) 35{ 36 float a, b; 37 38 if(n <= 1.0) 39 b = func1 (f, p2); 40 else 41 { 42 a = n <= p1->x ? 0.0 : p1->x; 43 b = a >= p2->y ? a : p2->y; 44 } 45 return(b); 46} 47 48void 49func3 (struct S1 *p) 50{ 51 float a = 0.0; 52 53 if (f) 54 a = func2 (bp1, bp2); 55 if (func_ex1 (a)) 56 bp1 = p; 57} 58