Commit 98b2dfbb by Richard Guenther Committed by Richard Biener

re PR c++/43080 (ICE with anonymous union and -flto)

2010-04-26  Richard Guenther  <rguenther@suse.de>

	PR lto/43080
	* gimple.c (gimple_decl_printable_name): Deal gracefully
	with a NULL DECL_NAME.

	* g++.dg/lto/20100423-3_0.C: New testcase.

From-SVN: r158723
parent 1ae3075b
2010-04-26 Richard Guenther <rguenther@suse.de> 2010-04-26 Richard Guenther <rguenther@suse.de>
PR lto/43080
* gimple.c (gimple_decl_printable_name): Deal gracefully
with a NULL DECL_NAME.
2010-04-26 Richard Guenther <rguenther@suse.de>
PR lto/42425 PR lto/42425
* tree.c (free_lang_data_in_type): Do not free TYPE_CONTEXT * tree.c (free_lang_data_in_type): Do not free TYPE_CONTEXT
if emitting debug information and it is either a function if emitting debug information and it is either a function
......
...@@ -4579,7 +4579,8 @@ gimple_ior_addresses_taken (bitmap addresses_taken, gimple stmt) ...@@ -4579,7 +4579,8 @@ gimple_ior_addresses_taken (bitmap addresses_taken, gimple stmt)
const char * const char *
gimple_decl_printable_name (tree decl, int verbosity) gimple_decl_printable_name (tree decl, int verbosity)
{ {
gcc_assert (decl && DECL_NAME (decl)); if (!DECL_NAME (decl))
return NULL;
if (DECL_ASSEMBLER_NAME_SET_P (decl)) if (DECL_ASSEMBLER_NAME_SET_P (decl))
{ {
......
2010-04-26 Richard Guenther <rguenther@suse.de> 2010-04-26 Richard Guenther <rguenther@suse.de>
PR lto/43080
* g++.dg/lto/20100423-3_0.C: New testcase.
2010-04-26 Richard Guenther <rguenther@suse.de>
PR lto/42425 PR lto/42425
* g++.dg/lto/20100423-2_0.C: New testcase. * g++.dg/lto/20100423-2_0.C: New testcase.
......
// { dg-lto-do assemble }
// { dg-lto-options {{-flto -g}} }
inline int foo()
{
static union { int i; };
return i;
}
void bar()
{
foo();
}
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