1 /* { dg-do run } */
2 /* { dg-options "-O2" } */
3 /* { dg-options "-mminimal-toc" { target { { powerpc*-*-* && lp64 } || { powerpc-ibm-aix* } } } } */
4
5 extern void abort (void);
6 extern void exit (int);
7
8 double __attribute__((noinline))
9 foo (void)
10 {
11 return 16441577472.0;
12 }
13
14 double __attribute__((noinline))
15 bar (double x)
16 {
17 return x;
18 }
19
20 int __attribute__((noinline))
21 test (void)
22 {
23 double x = foo ();
24 x = bar (x);
25 x /= 1024L * 1024L * 1024L;
26 x *= 70;
27 x = x < 70 ? x : 70;
28 x += 30;
29 return x;
30 }
31
32 int main (void)
33 {
34 if (test () != 100)
35 abort ();
36 exit (0);
37 }