init.c (build_new_1): Don't test TREE_CONSTANT of INTEGER_CST.
authorJakub Jelinek <jakub@redhat.com>
Thu, 27 Sep 2012 11:01:17 +0000 (13:01 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 27 Sep 2012 11:01:17 +0000 (13:01 +0200)
* init.c (build_new_1): Don't test TREE_CONSTANT
of INTEGER_CST.

From-SVN: r191803

gcc/cp/ChangeLog
gcc/cp/init.c

index ef89bae..46d8abe 100644 (file)
@@ -1,3 +1,8 @@
+2012-09-27  Jakub Jelinek  <jakub@redhat.com>
+
+       * init.c (build_new_1): Don't test TREE_CONSTANT
+       of INTEGER_CST.
+
 2012-09-25  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/54526
index b18f600..40d0ce3 100644 (file)
@@ -2235,8 +2235,7 @@ build_new_1 (VEC(tree,gc) **placement, tree type, tree nelts,
     {
       tree inner_nelts = array_type_nelts_top (elt_type);
       tree inner_nelts_cst = maybe_constant_value (inner_nelts);
-      if (TREE_CONSTANT (inner_nelts_cst)
-         && TREE_CODE (inner_nelts_cst) == INTEGER_CST)
+      if (TREE_CODE (inner_nelts_cst) == INTEGER_CST)
        {
          bool overflow;
          double_int result = TREE_INT_CST (inner_nelts_cst)