Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.dg / 20030414-2.c
blobf4eb8bf36ec2b3d2bfdd6d824f284beb9c897d55
1 /* Copyright (C) 2003 Free Software Foundation.
3 Check that constant folding (c1 - x) op c2 into x swap(op) c1-c2
4 doesn't break anything.
6 Written by Roger Sayle, 27th March 2003. */
8 /* { dg-do run } */
9 /* { dg-options "-O2 -ffast-math" } */
11 extern void abort (void);
13 int foo(double x)
15 return (10.0 - x) > 3.0;
18 int bar (double x)
20 return (10.0 - x) == 5.0;
23 int main()
25 if (foo (8.0))
26 abort ();
28 if (! foo (6.0))
29 abort ();
31 if (bar (1.0))
32 abort ();
34 if (! bar (5.0))
35 abort ();
36 return 0;