re PR debug/47209 (ICE: SIGSEGV in should_emit_struct_debug (dwarf2out.c:627) with -f{no-,}emit-struct-debug-{baseonly,reduced} -g)

2011-01-12  Kai Tietz  <kai.tietz@onevision.com>

	PR debug/47209
	* dwarfout2.c (should_emit_struct_debug): Use TYPE_MAIN_VARIANT
	of type.

2011-01-12  Kai Tietz  <kai.tietz@onevision.com>

	PR debug/47209
	* g++.dg/debug/pr47209.C: New.

From-SVN: r168718
This commit is contained in:
Kai Tietz 2011-01-12 17:02:41 +00:00 committed by Kai Tietz
parent 56e22cab21
commit d8a24b6521
4 changed files with 24 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2011-01-12 Kai Tietz <kai.tietz@onevision.com>
PR debug/47209
* dwarfout2.c (should_emit_struct_debug): Use TYPE_MAIN_VARIANT
of type.
2011-01-12 Jan Hubicka <jh@suse.cz>
PR driver/47244

View File

@ -619,7 +619,7 @@ should_emit_struct_debug (tree type, enum debug_info_usage usage)
if (criterion == DINFO_STRUCT_FILE_ANY)
return DUMP_GSTRUCT (type, usage, criterion, generic, false, true);
type_decl = TYPE_STUB_DECL (type);
type_decl = TYPE_STUB_DECL (TYPE_MAIN_VARIANT (type));
if (criterion == DINFO_STRUCT_FILE_SYS && DECL_IN_SYSTEM_HEADER (type_decl))
return DUMP_GSTRUCT (type, usage, criterion, generic, false, true);

View File

@ -1,3 +1,8 @@
2011-01-12 Kai Tietz <kai.tietz@onevision.com>
PR debug/47209
* g++.dg/debug/pr47209.C: New.
2011-01-12 Richard Guenther <rguenther@suse.de>
PR lto/47259

View File

@ -0,0 +1,12 @@
// { dg-do compile }
// { dg-options "-femit-struct-debug-baseonly" }
struct A
{
void foo ();
};
struct B : A
{
typedef const A base;
using base::foo;
};