aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2001-01-05 00:03:35 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2001-01-05 00:03:35 +0000
commit32812a40330cfe4d3ddd75635c75d831f00b4239 (patch)
treea62296d6ede0940d39347d1943a66967c97c7ff4 /gcc/fold-const.c
parenteaa7c03f500d8d7b5d88c2b02d11513cc489226e (diff)
downloadgcc-32812a40330cfe4d3ddd75635c75d831f00b4239.zip
gcc-32812a40330cfe4d3ddd75635c75d831f00b4239.tar.gz
gcc-32812a40330cfe4d3ddd75635c75d831f00b4239.tar.bz2
fold-const.c (fold): When folding a CONJ_EXPR of a COMPLEX_CST...
* fold-const.c (fold): When folding a CONJ_EXPR of a COMPLEX_CST, use TREE_REALPART and TREE_IMAGPART instead of TREE_OPERAND. testsuite: * gcc.c-torture/compile/20001222-1.x: Remove. From-SVN: r38696
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index b02fdaa..9516d0d 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -1,6 +1,6 @@
/* Fold a constant sub-tree into a single node for C-compiler
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000 Free Software Foundation, Inc.
+ 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -5278,8 +5278,8 @@ fold (expr)
TREE_OPERAND (arg0, 0),
negate_expr (TREE_OPERAND (arg0, 1)));
else if (TREE_CODE (arg0) == COMPLEX_CST)
- return build_complex (type, TREE_OPERAND (arg0, 0),
- negate_expr (TREE_OPERAND (arg0, 1)));
+ return build_complex (type, TREE_REALPART (arg0),
+ negate_expr (TREE_IMAGPART (arg0)));
else if (TREE_CODE (arg0) == PLUS_EXPR || TREE_CODE (arg0) == MINUS_EXPR)
return fold (build (TREE_CODE (arg0), type,
fold (build1 (CONJ_EXPR, type,