tree-cfg.c (verify_expr): Verify that BIT_FIELD_REFs, IMAGPART_EXPRs and REALPART_EXP...
authorMartin Jambor <mjambor@suse.cz>
Tue, 28 May 2013 13:18:55 +0000 (15:18 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Tue, 28 May 2013 13:18:55 +0000 (15:18 +0200)
2013-05-28  Martin Jambor  <mjambor@suse.cz>

* tree-cfg.c (verify_expr): Verify that BIT_FIELD_REFs, IMAGPART_EXPRs
and REALPART_EXPRs have scalar type.

From-SVN: r199379

gcc/ChangeLog
gcc/tree-cfg.c

index a7cc93d..6dbdf32 100644 (file)
@@ -1,3 +1,8 @@
+2013-05-28  Martin Jambor  <mjambor@suse.cz>
+
+       * tree-cfg.c (verify_expr): Verify that BIT_FIELD_REFs, IMAGPART_EXPRs
+       and REALPART_EXPRs have scalar type.
+
 2013-05-28  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/57411
index f38a32a..fe76a8c 100644 (file)
@@ -2668,10 +2668,17 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
 
     case REALPART_EXPR:
     case IMAGPART_EXPR:
+    case BIT_FIELD_REF:
+      if (!is_gimple_reg_type (TREE_TYPE (t)))
+       {
+         error ("non-scalar BIT_FIELD_REF, IMAGPART_EXPR or REALPART_EXPR");
+         return t;
+       }
+
+      /* Fall-through.  */
     case COMPONENT_REF:
     case ARRAY_REF:
     case ARRAY_RANGE_REF:
-    case BIT_FIELD_REF:
     case VIEW_CONVERT_EXPR:
       /* We have a nest of references.  Verify that each of the operands
         that determine where to reference is either a constant or a variable,