re PR c++/81055 (ICE with invalid initializer for array new)
/cp 2018-01-10 Paolo Carlini <paolo.carlini@oracle.com> PR c++/81055 * init.c (build_vec_init): Avoid building an INIT_EXPR with error_mark_node as second argument. /testsuite 2018-01-10 Paolo Carlini <paolo.carlini@oracle.com> PR c++/81055 * g++.dg/cpp0x/new2.C: New. From-SVN: r256438
This commit is contained in:
parent
389578d7a6
commit
143aa5cc4a
@ -1,3 +1,9 @@
|
||||
2018-01-10 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/81055
|
||||
* init.c (build_vec_init): Avoid building an INIT_EXPR with
|
||||
error_mark_node as second argument.
|
||||
|
||||
2018-01-09 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/83734
|
||||
|
@ -4399,7 +4399,9 @@ build_vec_init (tree base, tree maxindex, tree init,
|
||||
if (TREE_CODE (init) == TREE_LIST)
|
||||
init = build_x_compound_expr_from_list (init, ELK_INIT,
|
||||
complain);
|
||||
elt_init = build2 (INIT_EXPR, type, to, init);
|
||||
elt_init = (init == error_mark_node
|
||||
? error_mark_node
|
||||
: build2 (INIT_EXPR, type, to, init));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2018-01-10 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/81055
|
||||
* g++.dg/cpp0x/new2.C: New.
|
||||
|
||||
2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR target/83735
|
||||
|
4
gcc/testsuite/g++.dg/cpp0x/new2.C
Normal file
4
gcc/testsuite/g++.dg/cpp0x/new2.C
Normal file
@ -0,0 +1,4 @@
|
||||
// PR c++/81055
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
int** p = new int*[1]{q}; // { dg-error "not declared" }
|
Loading…
Reference in New Issue
Block a user