fold-const.c (fold): When folding a CONJ_EXPR of a COMPLEX_CST...
authorJoseph Myers <jsm28@cam.ac.uk>
Fri, 5 Jan 2001 00:03:35 +0000 (00:03 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Fri, 5 Jan 2001 00:03:35 +0000 (00:03 +0000)
* 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

gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20001222-1.x [deleted file]

index 0bf3db3e750443922fa8dda18a896de448def040..dd0d055f3809c8a40acf67617174366f278861e9 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
+
+       * fold-const.c (fold): When folding a CONJ_EXPR of a COMPLEX_CST,
+       use TREE_REALPART and TREE_IMAGPART instead of TREE_OPERAND.
+
 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
 
        * c-common.c (SIZE_TYPE, WCHAR_TYPE): Define.
index b02fdaa33e20017e2d2f0aab122a7088176d2f57..9516d0d4beea9cb33e32bc02705cc2a8d35e69db 100644 (file)
@@ -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,
index 6bda611f9c6e79827805fc6b8fb08016c34c2943..9661fc915151e77626f9fade44f0971c298db7d2 100644 (file)
@@ -1,3 +1,7 @@
+2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
+
+       * gcc.c-torture/compile/20001222-1.x: Remove.
+
 Thu Jan  4 13:54:11 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
        * gcc.c-torture/execute/built-in-setjmp.c: New.
diff --git a/gcc/testsuite/gcc.c-torture/compile/20001222-1.x b/gcc/testsuite/gcc.c-torture/compile/20001222-1.x
deleted file mode 100644 (file)
index f41cdc2..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-set torture_compile_xfail "*-*-*"
-return 0