diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr54877.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr54877.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr54877.c b/gcc/testsuite/gcc.dg/torture/pr54877.c new file mode 100644 index 00000000000..cee406e50d3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr54877.c @@ -0,0 +1,23 @@ +/* PR tree-optimization/54877 */ +/* { dg-do run } */ +/* { dg-options "-ffast-math" } */ + +extern void abort (void); + +int +foo (void) +{ + double d; + int i; + for (i = 0, d = 0; i < 64; i++) + d--; + return (int) d; +} + +int +main () +{ + if (foo () != -64) + abort (); + return 0; +} |