OSDN Git Service

* fold-const.c (fold_convertible_p): Correct the logic to follow
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 29 Feb 2008 22:01:22 +0000 (22:01 +0000)
committerfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 29 Feb 2008 22:01:22 +0000 (22:01 +0000)
that in fold_convert().

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132780 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/fold-const.c

index 32be0dd..e6f51da 100644 (file)
@@ -1,3 +1,8 @@
+2008-02-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
+
+       * fold-const.c (fold_convertible_p): Correct the logic to follow
+       that in fold_convert().
+
 2008-02-29  Douglas Gregor  <doug.gregor@gmail.com>
 
        PR c++/35315
index 987acf1..5af6f0d 100644 (file)
@@ -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;
     }
 }