From a377ff85d0572f5fa1bbb87351e27f54684c456b Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Tue, 26 Dec 1995 21:52:06 -0500 Subject: [PATCH] (fold_convert): When converting a NaN to another type, change the type of the node before returning it. From-SVN: r10863 --- gcc/fold-const.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/fold-const.c b/gcc/fold-const.c index ba459c00f7d..14e11d04b15 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -1481,7 +1481,11 @@ fold_convert (t, arg1) if (TREE_CODE (arg1) == REAL_CST) { if (REAL_VALUE_ISNAN (TREE_REAL_CST (arg1))) - return arg1; + { + t = arg1; + TREE_TYPE (arg1) = type; + return t; + } else if (setjmp (float_error)) { overflow = 1; -- 2.30.2