OSDN Git Service

2008-08-18 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 Aug 2008 14:21:35 +0000 (14:21 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 Aug 2008 14:21:35 +0000 (14:21 +0000)
* tree-cfg.c (verify_types_in_gimple_assign): Verify copies
and loads have the correct types.

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

gcc/ChangeLog
gcc/tree-cfg.c

index 747e45b..46a22ea 100644 (file)
@@ -1,3 +1,8 @@
+2008-08-18  Richard Guenther  <rguenther@suse.de>
+
+       * tree-cfg.c (verify_types_in_gimple_assign): Verify copies
+       and loads have the correct types.
+
 2008-08-18  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
 
        PR cpp/7263
index c1344a7..08920ae 100644 (file)
@@ -3544,6 +3544,7 @@ verify_types_in_gimple_assign (gimple stmt)
   /* Generic handling via classes.  */
   switch (TREE_CODE_CLASS (rhs_code))
     {
+    case tcc_exceptional: /* for SSA_NAME */
     case tcc_unary:
       if (!useless_type_conversion_p (lhs_type, rhs1_type))
        {
@@ -3555,6 +3556,15 @@ verify_types_in_gimple_assign (gimple stmt)
       break;
 
     case tcc_reference:
+      /* All tcc_reference trees are GIMPLE_SINGLE_RHS.  Verify that
+         no implicit type change happens here.  */
+      if (!useless_type_conversion_p (lhs_type, rhs1_type))
+       {
+         error ("non-trivial conversion at assignment");
+         debug_generic_expr (lhs);
+         debug_generic_expr (rhs1);
+         return true;
+       }
       return verify_types_in_gimple_reference (rhs1);
 
     case tcc_comparison: