Commit 7e529795 by Richard Guenther Committed by Richard Biener

re PR debug/51262 (ICE: SIGSEGV in primary_template_instantiation_p (pt.c:2874) with -flto -g)

2011-12-12  Richard Guenther  <rguenther@suse.de>

	PR lto/51262
	* tree.c (cp_free_lang_data): No longer clear anonymous names.

	* g++.dg/opt/pr51262.C: New testcase.

From-SVN: r182221
parent 0a5a95f2
2011-12-12 Richard Guenther <rguenther@suse.de>
PR lto/51262
* tree.c (cp_free_lang_data): No longer clear anonymous names.
2011-12-09 Jason Merrill <jason@redhat.com>
PR c++/51151
......
......@@ -3479,17 +3479,6 @@ cp_free_lang_data (tree t)
DECL_EXTERNAL (t) = 1;
TREE_STATIC (t) = 0;
}
if (CP_AGGREGATE_TYPE_P (t)
&& TYPE_NAME (t))
{
tree name = TYPE_NAME (t);
if (TREE_CODE (name) == TYPE_DECL)
name = DECL_NAME (name);
/* Drop anonymous names. */
if (name != NULL_TREE
&& ANON_AGGRNAME_P (name))
TYPE_NAME (t) = NULL_TREE;
}
if (TREE_CODE (t) == NAMESPACE_DECL)
{
/* The list of users of a namespace isn't useful for the middle-end
......
2011-12-12 Richard Guenther <rguenther@suse.de>
PR lto/51262
* g++.dg/opt/pr51262.C: New testcase.
2011-12-12 Revital Eres <revital.eres@linaro.org>
PR rtl-optimization/47013
......
// { dg-do compile }
// { dg-require-effective-target lto }
// { dg-options "-flto -g" }
template < typename > void *
bar (int *p)
{
union
{
int *p;
}
u;
u.p = p;
return u.p;
}
void
foo (int *p)
{
bar < void >(p);
}
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