aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2014-01-24 17:47:31 +0100
committerJason Merrill <jason@gcc.gnu.org>2014-01-24 11:47:31 -0500
commit2cbf3dd796900d4e1af4678842d9347da1766176 (patch)
treecbcebdc83d9c56c679b2e436fbacc734ed15f602 /gcc
parentc51f5910f32421583d6b64d9681bba4c1b7d9a62 (diff)
downloadgcc-2cbf3dd796900d4e1af4678842d9347da1766176.zip
gcc-2cbf3dd796900d4e1af4678842d9347da1766176.tar.gz
gcc-2cbf3dd796900d4e1af4678842d9347da1766176.tar.bz2
typeck2.c (split_nonconstant_init_1): Fix num_split_elts handling for RANGE_ARRAY case.
* typeck2.c (split_nonconstant_init_1): Fix num_split_elts handling for RANGE_ARRAY case. From-SVN: r207050
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/typeck2.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index d9098b4..d9f023a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2014-01-24 Jakub Jelinek <jakub@redhat.com>
+
+ * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
+ handling for RANGE_ARRAY case.
+
2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57524
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 25edbac..897570a 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -643,6 +643,8 @@ split_nonconstant_init_1 (tree dest, tree init)
code = build_vec_init (sub, max, value, false, 0,
tf_warning_or_error);
add_stmt (code);
+ if (tree_fits_shwi_p (max))
+ num_split_elts += tree_to_shwi (max);
}
else
{