re PR other/52443 (ICE: verify_gimple failed: invalid types in nop conversion)
authorRichard Guenther <rguenther@suse.de>
Thu, 1 Mar 2012 12:26:20 +0000 (12:26 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 1 Mar 2012 12:26:20 +0000 (12:26 +0000)
2012-03-01  Richard Guenther  <rguenther@suse.de>

PR middle-end/52443
* tree-cfg.c (verify_gimple_assign_unary): Allow any
conversions from integral types to pointer types.

From-SVN: r184739

gcc/ChangeLog
gcc/tree-cfg.c

index 04c09f7..b4477dc 100644 (file)
@@ -1,3 +1,9 @@
+2012-03-01  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/52443
+       * tree-cfg.c (verify_gimple_assign_unary): Allow any
+       conversions from integral types to pointer types.
+
 2012-03-01  Georg-Johann Lay  <avr@gjlay.de>
 
        * config/avr/avr-c.c (avr_cpu_cpp_builtins): Restore built-in
index 66ea928..9f75650 100644 (file)
@@ -3340,15 +3340,12 @@ verify_gimple_assign_unary (gimple stmt)
     {
     CASE_CONVERT:
       {
-       /* Allow conversions between integral types and pointers only if
+       /* Allow conversions from pointer type to integral type only if
           there is no sign or zero extension involved.
           For targets were the precision of ptrofftype doesn't match that
-          of pointers we need to allow arbitrary conversions from and
-          to ptrofftype.  */
+          of pointers we need to allow arbitrary conversions to ptrofftype.  */
        if ((POINTER_TYPE_P (lhs_type)
-            && INTEGRAL_TYPE_P (rhs1_type)
-            && (TYPE_PRECISION (lhs_type) >= TYPE_PRECISION (rhs1_type)
-                || ptrofftype_p (rhs1_type)))
+            && INTEGRAL_TYPE_P (rhs1_type))
            || (POINTER_TYPE_P (rhs1_type)
                && INTEGRAL_TYPE_P (lhs_type)
                && (TYPE_PRECISION (rhs1_type) >= TYPE_PRECISION (lhs_type)