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
This commit is contained in:
Joseph Myers 2001-01-05 00:03:35 +00:00 committed by Joseph Myers
parent eaa7c03f50
commit 32812a4033
4 changed files with 12 additions and 5 deletions

View 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.

View 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,

View 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.

View File

@ -1,2 +0,0 @@
set torture_compile_xfail "*-*-*"
return 0