From a333b79fc53fa0b721a74e4444920c209296a06b Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Thu, 4 Mar 1993 20:34:20 +0000 Subject: [PATCH] (fold): Fix error in handling REALPART_EXPR and IMAGPART_EXPR. From-SVN: r3644 --- gcc/fold-const.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 9e2fb82..fe9b72d 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -4403,7 +4403,7 @@ fold (expr) return t; case REALPART_EXPR: - if (TREE_CODE (type) != COMPLEX_TYPE) + if (TREE_CODE (TREE_TYPE (arg0)) != COMPLEX_TYPE) return t; else if (TREE_CODE (arg0) == COMPLEX_EXPR) return omit_one_operand (type, TREE_OPERAND (arg0, 0), @@ -4422,7 +4422,7 @@ fold (expr) return t; case IMAGPART_EXPR: - if (TREE_CODE (type) != COMPLEX_TYPE) + if (TREE_CODE (TREE_TYPE (arg0)) != COMPLEX_TYPE) return convert (type, integer_zero_node); else if (TREE_CODE (arg0) == COMPLEX_EXPR) return omit_one_operand (type, TREE_OPERAND (arg0, 1), -- 2.7.4