aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-09-27 13:01:17 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2012-09-27 13:01:17 +0200
commite1f10dd97237ffc9a2672a2882098a12594ddb6b (patch)
treefe9f5f150b3420de39c6914f3df41d01d7b87772
parent6b74529d9b26ae4d4fd0bdb96b9ce44c40738c9f (diff)
downloadgcc-e1f10dd97237ffc9a2672a2882098a12594ddb6b.zip
gcc-e1f10dd97237ffc9a2672a2882098a12594ddb6b.tar.gz
gcc-e1f10dd97237ffc9a2672a2882098a12594ddb6b.tar.bz2
init.c (build_new_1): Don't test TREE_CONSTANT of INTEGER_CST.
* init.c (build_new_1): Don't test TREE_CONSTANT of INTEGER_CST. From-SVN: r191803
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/init.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ef89bae..46d8abe 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index b18f600..40d0ce3 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -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)