diff options
author | Richard Biener <rguenther@suse.de> | 2015-07-24 10:31:21 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-07-24 10:31:21 +0000 |
commit | 24f1db9c0d7900c641ca795fd631c14fdf174b49 (patch) | |
tree | c85bbadb864cda18e5f96a42bd3d4f53fb691f79 /gcc/cp | |
parent | 25a627733f92db8a4e00a40c3eb6b1b394b5bdfd (diff) | |
download | gcc-24f1db9c0d7900c641ca795fd631c14fdf174b49.zip gcc-24f1db9c0d7900c641ca795fd631c14fdf174b49.tar.gz gcc-24f1db9c0d7900c641ca795fd631c14fdf174b49.tar.bz2 |
fold-const.c (maybe_canonicalize_comparison_1): Move A code CST canonicalization ...
2015-07-24 Richard Biener <rguenther@suse.de>
* fold-const.c (maybe_canonicalize_comparison_1): Move
A code CST canonicalization ...
* match.pd: ... to a pattern here.
cp/
* init.c (build_vec_init): Build iterator bound in the same
type as the iterator.
From-SVN: r226143
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/init.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 51766ea..df805e6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2015-07-24 Richard Biener <rguenther@suse.de> + + * init.c (build_vec_init): Build iterator bound in the same + type as the iterator. + 2015-07-23 Marek Polacek <polacek@redhat.com> PR c++/66572 diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 01194d6..dbbe7d5 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -3599,7 +3599,8 @@ build_vec_init (tree base, tree maxindex, tree init, if (length_check) { - tree nelts = size_int (CONSTRUCTOR_NELTS (init) - 1); + tree nelts = build_int_cst (ptrdiff_type_node, + CONSTRUCTOR_NELTS (init) - 1); if (TREE_CODE (atype) != ARRAY_TYPE) { if (flag_exceptions) |