summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/20040303-1.c
blob: 325853860b6e3eaf5a1e840946e3b52520210133 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* Test floating point division on ia64.  There was a bug in the
   max-throughput version of the inline division code.  Expecting an
   exact value from a floating point expression is unwise but GCC
   depends on it in allocno_compare.  */

/* { dg-do run { target ia64-*-* } } */
/* { dg-options "-minline-float-divide-max-throughput" { target ia64-*-* } } */

extern void abort (void);

volatile int i = 24;
volatile int j = 30;
volatile int k = 1;

int main()
{
        int pri2 = (((double) i / j) * (10000 / 1000) * k);
        if (pri2 != 8) abort();
	return 0;
}