Commit d5eebac0 by Jason Merrill Committed by Jason Merrill

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
parent a82ecc7b
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> 2010-04-01 Jason Merrill <jason@redhat.com>
* decl.c (next_initializable_field): No longer static. * decl.c (next_initializable_field): No longer static.
......
...@@ -3720,14 +3720,16 @@ maybe_update_decl_type (tree orig_type, tree scope) ...@@ -3720,14 +3720,16 @@ maybe_update_decl_type (tree orig_type, tree scope)
TYPENAME_TYPEs and SCOPE_REFs that were previously dependent. */ TYPENAME_TYPEs and SCOPE_REFs that were previously dependent. */
tree args = current_template_args (); tree args = current_template_args ();
tree auto_node = type_uses_auto (type); tree auto_node = type_uses_auto (type);
tree pushed;
if (auto_node) if (auto_node)
{ {
tree auto_vec = make_tree_vec (1); tree auto_vec = make_tree_vec (1);
TREE_VEC_ELT (auto_vec, 0) = auto_node; TREE_VEC_ELT (auto_vec, 0) = auto_node;
args = add_to_template_args (args, auto_vec); 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); type = tsubst (type, args, tf_warning_or_error, NULL_TREE);
if (pushed)
pop_scope (scope); pop_scope (scope);
} }
......
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 2010-04-06 Jan Hubicka <jh@suse.czpli
PR tree-optimization/42906 PR tree-optimization/42906
......
// PR c++/43621
template <typename T>
class A {
template <typename>
A<T> A<T>::f(); // { dg-error "extra qualification" }
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment