diff options
author | Francois-Xavier Coudert <coudert@clipper.ens.fr> | 2008-02-29 23:01:22 +0100 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2008-02-29 22:01:22 +0000 |
commit | c17ee676e55b86d2c9d61b569a8c7e0cd8fb6d4c (patch) | |
tree | 86465da24732e848fbf823e58fa84ccab42225b0 /gcc/fold-const.c | |
parent | f31c9f09a1b5c59b7c73daaab8e138ac2bedcd0b (diff) | |
download | gcc-c17ee676e55b86d2c9d61b569a8c7e0cd8fb6d4c.zip gcc-c17ee676e55b86d2c9d61b569a8c7e0cd8fb6d4c.tar.gz gcc-c17ee676e55b86d2c9d61b569a8c7e0cd8fb6d4c.tar.bz2 |
fold-const.c (fold_convertible_p): Correct the logic to follow that in fold_convert().
* fold-const.c (fold_convertible_p): Correct the logic to follow
that in fold_convert().
From-SVN: r132780
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 987acf1..5af6f0d 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -2475,8 +2475,15 @@ fold_convertible_p (const_tree type, const_tree arg) return (TREE_CODE (orig) == VECTOR_TYPE && tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE (orig))); - default: + case REAL_TYPE: + case FIXED_POINT_TYPE: + case COMPLEX_TYPE: + case VECTOR_TYPE: + case VOID_TYPE: return TREE_CODE (type) == TREE_CODE (orig); + + default: + return false; } } |