diff options
author | Roger Sayle <roger@eyesopen.com> | 2003-08-26 21:44:46 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2003-08-26 21:44:46 +0000 |
commit | 00229de405d3ddbe05a4229a4758b67aee1b88b6 (patch) | |
tree | f66d45ff83456aa8be9b704e85862705c14f4a6f /gcc/tree.h | |
parent | b41ead3e3537c589c78911ad0426c22a029cfb46 (diff) | |
download | gcc-00229de405d3ddbe05a4229a4758b67aee1b88b6.zip gcc-00229de405d3ddbe05a4229a4758b67aee1b88b6.tar.gz gcc-00229de405d3ddbe05a4229a4758b67aee1b88b6.tar.bz2 |
re PR middle-end/12002 (internal compiler error: in gen_lowpart, at emit-rtl.c:1374)
PR middle-end/12002
* tree.h (SCALAR_FLOAT_TYPE_P, COMPLEX_FLOAT_TYPE_P): New macros.
(FLOAT_TYPE_P): Define in terms of these two new macros.
* fold-const.c (fold <PLUS_EXPR>): Don't convert x+x into x*2.0
for complex floating point types.
* g77.f-torture/compile/12002.f: New test case.
From-SVN: r70821
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -446,13 +446,21 @@ extern void tree_operand_check_failed (int, enum tree_code, (TREE_CODE (TYPE) == INTEGER_TYPE || TREE_CODE (TYPE) == ENUMERAL_TYPE \ || TREE_CODE (TYPE) == BOOLEAN_TYPE || TREE_CODE (TYPE) == CHAR_TYPE) +/* Nonzero if TYPE represents a scalar floating-point type. */ + +#define SCALAR_FLOAT_TYPE_P(TYPE) (TREE_CODE (TYPE) == REAL_TYPE) + +/* Nonzero if TYPE represents a complex floating-point type. */ + +#define COMPLEX_FLOAT_TYPE_P(TYPE) \ + (TREE_CODE (TYPE) == COMPLEX_TYPE \ + && TREE_CODE (TREE_TYPE (TYPE)) == REAL_TYPE) + /* Nonzero if TYPE represents a floating-point type, including complex floating-point types. */ #define FLOAT_TYPE_P(TYPE) \ - (TREE_CODE (TYPE) == REAL_TYPE \ - || (TREE_CODE (TYPE) == COMPLEX_TYPE \ - && TREE_CODE (TREE_TYPE (TYPE)) == REAL_TYPE)) + (SCALAR_FLOAT_TYPE_P (TYPE) || COMPLEX_FLOAT_TYPE_P (TYPE)) /* Nonzero if TYPE represents an aggregate (multi-component) type. */ |