]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/20030826-1.c
replace ISL with isl
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / 20030826-1.c
CommitLineData
e3232933
RS
1/* Copyright (C) 2003 Free Software Foundation.
2
3 Check that constant folding of mathematical expressions doesn't
4 break anything.
5
6 Written by Roger Sayle, 24th August 2003. */
7
8/* { dg-do run } */
9/* { dg-options "-O2 -ffast-math" } */
10
11void abort(void);
12
13double foo(double x)
14{
15 return 12.0/(x*3.0);
16}
17
18double bar(double x)
19{
20 return (3.0/x)*4.0;
21}
22
23int main()
24{
25 if (foo(2.0) != 2.0)
26 abort ();
27
28 if (bar(2.0) != 6.0)
29 abort ();
30
31 return 0;
32}
33