From e1f10dd97237ffc9a2672a2882098a12594ddb6b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 27 Sep 2012 13:01:17 +0200 Subject: [PATCH] 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 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/init.c | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ef89bae85e9..46d8abed097 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2012-09-27 Jakub Jelinek + + * init.c (build_new_1): Don't test TREE_CONSTANT + of INTEGER_CST. + 2012-09-25 Paolo Carlini PR c++/54526 diff --git a/gcc/cp/init.c b/gcc/cp/init.c index b18f600e1b0..40d0ce325f3 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) -- 2.30.2