From 1aa79290e4cc570909c029c9123239927b410ec1 Mon Sep 17 00:00:00 2001 From: sayle Date: Wed, 20 Aug 2003 21:55:01 +0000 Subject: PR middle-end/11984 * fold-const.c (fold ): Check for integer constant operands before calling tree_int_cst_lt when performing associative transformations. * gcc.dg/20030820-1.c: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70618 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/gcc.dg/20030820-1.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/20030820-1.c (limited to 'gcc/testsuite/gcc.dg/20030820-1.c') diff --git a/gcc/testsuite/gcc.dg/20030820-1.c b/gcc/testsuite/gcc.dg/20030820-1.c new file mode 100644 index 00000000000..f86fb3978f4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20030820-1.c @@ -0,0 +1,13 @@ +/* PR middle-end/11984 */ +/* The following program used to ICE in fold because we didn't check + whether the constants we were reassociating were integer constants + before calling tree_int_cst_lt. */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -ffast-math" } */ + +double f(double x) +{ + return 1.0 - x - 0.1; +} + -- cgit v1.2.1