gimplify.c (gimplify_init_constructor): Do not leave non-GIMPLE vector constructors...
authorRichard Biener <rguenther@suse.de>
Mon, 22 Sep 2014 12:49:16 +0000 (12:49 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 22 Sep 2014 12:49:16 +0000 (12:49 +0000)
2014-09-22  Richard Biener  <rguenther@suse.de>

* gimplify.c (gimplify_init_constructor): Do not leave
non-GIMPLE vector constructors around.
* tree-cfg.c (verify_gimple_assign_single): Verify that
CONSTRUCTORs have gimple elements.

From-SVN: r215461

gcc/ChangeLog
gcc/gimplify.c
gcc/tree-cfg.c

index 02101ee116ada464abaf61de6472b5da3473c9f5..ac79f4fe8e9868e45cc5b9dc1eef5d2935b5253d 100644 (file)
@@ -1,3 +1,10 @@
+2014-09-22  Richard Biener  <rguenther@suse.de>
+
+       * gimplify.c (gimplify_init_constructor): Do not leave
+       non-GIMPLE vector constructors around.
+       * tree-cfg.c (verify_gimple_assign_single): Verify that
+       CONSTRUCTORs have gimple elements.
+
 2014-09-22  Jakub Jelinek  <jakub@redhat.com>
 
        PR debug/63328
index 0ebc24c45240f6e84957590aff9c4ebb75ba4259..5933dd2f66834a9ee1d0503630ef24c38712958b 100644 (file)
@@ -4021,12 +4021,6 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
                break;
              }
 
-           /* Don't reduce an initializer constant even if we can't
-              make a VECTOR_CST.  It won't do anything for us, and it'll
-              prevent us from representing it as a single constant.  */
-           if (initializer_constant_valid_p (ctor, type))
-             break;
-
            TREE_CONSTANT (ctor) = 0;
          }
 
index e89d76a015aaf4e8e4bacec3cbcef1b9b03620d6..e88842a2c5089a2bc7ea8268a9fd654751305ed2 100644 (file)
@@ -4207,8 +4207,20 @@ verify_gimple_assign_single (gimple stmt)
                  debug_generic_stmt (rhs1);
                  return true;
                }
+             if (!is_gimple_val (elt_v))
+               {
+                 error ("vector CONSTRUCTOR element is not a GIMPLE value");
+                 debug_generic_stmt (rhs1);
+                 return true;
+               }
            }
        }
+      else if (CONSTRUCTOR_NELTS (rhs1) != 0)
+       {
+         error ("non-vector CONSTRUCTOR with elements");
+         debug_generic_stmt (rhs1);
+         return true;
+       }
       return res;
     case OBJ_TYPE_REF:
     case ASSERT_EXPR: