re PR c++/43621 (ICE: in poplevel_class, at cp/name-lookup.c:2615 with invalid qualified name)
PR c++/43621 * pt.c (maybe_update_decl_type): Check the return value from push_scope. From-SVN: r158006
This commit is contained in:
parent
a82ecc7b20
commit
d5eebac0bb
4 changed files with 22 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2010-04-06 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/43621
|
||||
* pt.c (maybe_update_decl_type): Check the return value from
|
||||
push_scope.
|
||||
|
||||
2010-04-01 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* decl.c (next_initializable_field): No longer static.
|
||||
|
|
|
@ -3720,15 +3720,17 @@ maybe_update_decl_type (tree orig_type, tree scope)
|
|||
TYPENAME_TYPEs and SCOPE_REFs that were previously dependent. */
|
||||
tree args = current_template_args ();
|
||||
tree auto_node = type_uses_auto (type);
|
||||
tree pushed;
|
||||
if (auto_node)
|
||||
{
|
||||
tree auto_vec = make_tree_vec (1);
|
||||
TREE_VEC_ELT (auto_vec, 0) = auto_node;
|
||||
args = add_to_template_args (args, auto_vec);
|
||||
}
|
||||
push_scope (scope);
|
||||
pushed = push_scope (scope);
|
||||
type = tsubst (type, args, tf_warning_or_error, NULL_TREE);
|
||||
pop_scope (scope);
|
||||
if (pushed)
|
||||
pop_scope (scope);
|
||||
}
|
||||
|
||||
if (type == error_mark_node)
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2010-04-06 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/43621
|
||||
* g++.dg/template/error-recovery2.C: New.
|
||||
|
||||
2010-04-06 Jan Hubicka <jh@suse.czpli
|
||||
|
||||
PR tree-optimization/42906
|
||||
|
|
7
gcc/testsuite/g++.dg/template/error-recovery2.C
Normal file
7
gcc/testsuite/g++.dg/template/error-recovery2.C
Normal file
|
@ -0,0 +1,7 @@
|
|||
// PR c++/43621
|
||||
|
||||
template <typename T>
|
||||
class A {
|
||||
template <typename>
|
||||
A<T> A<T>::f(); // { dg-error "extra qualification" }
|
||||
};
|
Loading…
Add table
Reference in a new issue