re PR debug/43628 (in-class func-ptr type parameter has unspecified DW_AT_type)

Fix PR debug/43628

gcc/ChangeLog:
	PR debug/43628
	* dwarf2out.c (modified_type_die): Ignore artificial typedefs.

gcc/testsuite/ChangeLog:
	PR debug/43628
	* g++.dg/debug/dwarf2/typedef2.C: New test.

From-SVN: r158044
This commit is contained in:
Dodji Seketeli 2010-04-07 09:59:04 +00:00 committed by Dodji Seketeli
parent b97b26342e
commit a42f121709
4 changed files with 23 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2010-04-07 Dodji Seketeli <dodji@redhat.com>
PR debug/43628
* dwarf2out.c (modified_type_die): Ignore artificial typedefs.
2010-04-06 Kai Tietz <kai.tietz@onevision.com>
* config/i386/i386.c (ix86_handle_cconv_attribute): Ignore

View file

@ -12146,7 +12146,8 @@ modified_type_die (tree type, int is_const_type, int is_volatile_type,
name = qualified_type ? TYPE_NAME (qualified_type) : NULL;
/* Handle C typedef types. */
if (name && TREE_CODE (name) == TYPE_DECL && DECL_ORIGINAL_TYPE (name))
if (name && TREE_CODE (name) == TYPE_DECL && DECL_ORIGINAL_TYPE (name)
&& !DECL_ARTIFICIAL (name))
{
tree dtype = TREE_TYPE (name);

View file

@ -1,3 +1,8 @@
2010-04-07 Dodji Seketeli <dodji@redhat.com>
PR debug/43628
* g++.dg/debug/dwarf2/typedef2.C: New test.
2010-04-06 Dodji Seketeli <dodji@redhat.com>
* g++.dg/debug/dwarf2/redeclaration-1.C: Moved from

View file

@ -0,0 +1,11 @@
// Origin: PR debug/43628
// { dg-options "-g -dA" }
// { dg-do compile }
// { dg-final { scan-assembler-times "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_formal_parameter\\)\[\n\r\]{1,2}\[^\n\r\]*DW_AT_type\[\n\r\]{1,2}" 1 } }
class C
{
public:
typedef void (*t) (C);
};
C::t f;