diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/20031009-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/20031009-1.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/20031009-1.c b/gcc/testsuite/gcc.dg/20031009-1.c new file mode 100644 index 00000000000..696d574daf9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20031009-1.c @@ -0,0 +1,19 @@ +/* PR optimization/12510 */ +/* Origin: Lars Skovlund <lskovlun@image.dk> */ +/* Reduced testcase by Volker Reichelt <reichelt@igpm.rwth-aachen.de> */ + +/* Verify that one splitting pass is not missing on x86 at -O1 */ + +/* { dg-do compile } */ +/* { dg-options "-O -mcpu=i686" { target i?86-*-* } } */ + +extern foo(double); + +void bar(double x, double y) +{ + foo (x); + if (y) x = y ? 0 : 1/y; + else if (y) x = y < 1 ? 1 : y; + else x = 1/y < 1 ? 1 : x; + foo (x); +} |