tree-cfg.c (verify_gimple_expr): Fix check for conversions between integral types.
authorRichard Guenther <rguenther@suse.de>
Sat, 1 Sep 2007 09:05:05 +0000 (09:05 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Sat, 1 Sep 2007 09:05:05 +0000 (09:05 +0000)
2007-09-01  Richard Guenther  <rguenther@suse.de>

* tree-cfg.c (verify_gimple_expr): Fix check for conversions
between integral types.  Also allow conversions between
pointer types.

From-SVN: r128011

gcc/ChangeLog
gcc/tree-cfg.c

index 8edd7f4d5e9c089102c60b4988412c0558373faf..a90d832f6c6b6dcc5cb2c7c29c2b545bee6429db 100644 (file)
@@ -1,3 +1,9 @@
+2007-09-01  Richard Guenther  <rguenther@suse.de>
+
+       * tree-cfg.c (verify_gimple_expr): Fix check for conversions
+       between integral types.  Also allow conversions between
+       pointer types.
+
 2007-08-31  Andrew Pinski  <andrew_pinski@playstation.sony.com>
 
        * optabs.c (prepare_float_lib_cmp): Use
index 8e889fa0ecde4e5f058ecdf55a615c85589c70fe..e70b440dfc2e85c6c9855ab62d6da418a513aa37 100644 (file)
@@ -3574,8 +3574,10 @@ verify_gimple_expr (tree expr)
            return true;
          }
 
-       /* Allow conversions between integral types.  */
-        if (INTEGRAL_TYPE_P (type) == INTEGRAL_TYPE_P (TREE_TYPE (op)))
+       /* Allow conversions between integral types and between
+          pointer types.  */
+        if ((INTEGRAL_TYPE_P (type) && INTEGRAL_TYPE_P (TREE_TYPE (op)))
+           || (POINTER_TYPE_P (type) && POINTER_TYPE_P (TREE_TYPE (op))))
          return false;
 
        /* Allow conversions between integral types and pointers only if