diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2010-12-15 17:35:04 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2010-12-15 17:35:04 +0000 |
commit | 272dc8514341566a82eeba15fc1ebc78bb058358 (patch) | |
tree | dbc26356c5a8f07d6802127f4c6e4b322b817203 /gcc/cp | |
parent | da17cbb79b755dbc2beaa109450535bddd600481 (diff) | |
download | gcc-272dc8514341566a82eeba15fc1ebc78bb058358.zip gcc-272dc8514341566a82eeba15fc1ebc78bb058358.tar.gz gcc-272dc8514341566a82eeba15fc1ebc78bb058358.tar.bz2 |
re PR c++/42083 ([C++0x] ICE on invalid with "tree check: expected aggr_init_expr, have error_mark in build_value_init")
/cp
2010-12-15 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/42083
* init.c (build_value_init): Check build_special_member_call return
value for error_mark_node.
/testsuite
2010-12-15 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/42083
* g++.dg/cpp0x/lambda/lambda-ice2.C: New.
From-SVN: r167862
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/init.c | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 142dd53..6dd121a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2010-12-15 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/42083 + * init.c (build_value_init): Check build_special_member_call return + value for error_mark_node. + 2010-12-14 Jason Merrill <jason@redhat.com> PR c++/46930 diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 5a4f91c..9c3dd32 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -314,9 +314,11 @@ build_value_init (tree type, tsubst_flags_t complain) tree ctor = build_special_member_call (NULL_TREE, complete_ctor_identifier, NULL, type, LOOKUP_NORMAL, complain); - - ctor = build_aggr_init_expr (type, ctor); - AGGR_INIT_ZERO_FIRST (ctor) = 1; + if (ctor != error_mark_node) + { + ctor = build_aggr_init_expr (type, ctor); + AGGR_INIT_ZERO_FIRST (ctor) = 1; + } return ctor; } } |