diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-26 14:03:32 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-26 14:03:32 +0000 |
commit | 9e085e11ab8e909e071437c33ce0a002c6d4793e (patch) | |
tree | a0937b5651dc906415dc19437170d0a1133103de /gcc/cp | |
parent | 91d33e9471f0fc133119242867671994c85584cf (diff) | |
download | gcc-9e085e11ab8e909e071437c33ce0a002c6d4793e.tar.gz |
/cp
2012-10-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54984
* init.c (build_new): Don't turn a null *init into a pointer to
empty vector orig_init.
/testsuite
2012-10-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54984
* g++.dg/template/new11.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192846 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/init.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3cd3b27bc17..1a94fb366bd 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2012-10-26 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/54984 + * init.c (build_new): Don't turn a null *init into a pointer to + empty vector orig_init. + 2012-10-25 Paolo Carlini <paolo.carlini@oracle.com> PR c++/53761 diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 044603887e8..013b01eeb87 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -2911,7 +2911,8 @@ build_new (VEC(tree,gc) **placement, tree type, tree nelts, orig_placement = make_tree_vector_copy (*placement); orig_nelts = nelts; - orig_init = make_tree_vector_copy (*init); + if (*init) + orig_init = make_tree_vector_copy (*init); make_args_non_dependent (*placement); if (nelts) |