Commit d110c52e by Jason Merrill Committed by Jason Merrill

re PR c++/61445 ([C++11] ice in instantiate_decl at cp/pt.c:19770)

	PR c++/61445
	PR c++/56947
	* pt.c (instantiate_decl): Don't check defer_ok for local class
	members.

From-SVN: r212524
parent d8e11262
2014-07-14 Jason Merrill <jason@redhat.com>
PR c++/61445
PR c++/56947
* pt.c (instantiate_decl): Don't check defer_ok for local class
members.
2014-07-14 Jakub Jelinek <jakub@redhat.com> 2014-07-14 Jakub Jelinek <jakub@redhat.com>
PR middle-end/61294 PR middle-end/61294
......
...@@ -19775,11 +19775,6 @@ instantiate_decl (tree d, int defer_ok, ...@@ -19775,11 +19775,6 @@ instantiate_decl (tree d, int defer_ok,
if (external_p && !always_instantiate_p (d)) if (external_p && !always_instantiate_p (d))
return d; return d;
/* Any local class members should be instantiated from the TAG_DEFN
with defer_ok == 0. */
gcc_checking_assert (!defer_ok || !decl_function_context (d)
|| LAMBDA_TYPE_P (DECL_CONTEXT (d)));
gen_tmpl = most_general_template (tmpl); gen_tmpl = most_general_template (tmpl);
gen_args = DECL_TI_ARGS (d); gen_args = DECL_TI_ARGS (d);
......
// PR c++/61445
template <typename T> void f (T)
{
struct A
{
struct B { B(); };
void g () { B b; }
};
}
int main()
{
f(0);
}
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