xref: /openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/gcc.c-torture/compile/20011219-2.c (revision c87b03e512fc05ed6e0222f6fb0ae86264b1d05b)
1 /* This testcase failed on Alpha at -O2 when simplifying conditional
2    expressions.  */
3 
4 struct S {
5   unsigned long a;
6   double b, c;
7 };
8 
9 extern double bar (double, double);
10 
11 int
foo(unsigned long x,unsigned int y,struct S * z)12 foo (unsigned long x, unsigned int y, struct S *z)
13 {
14   unsigned int a = z->a;
15   int b = y / z->a > 1 ? y / z->a : 1;
16 
17   a = y / b < z->a ? y / b : z->a;
18   z->c = z->b * bar ((double) a, (double) x);
19   return 0;
20 }
21