gcc/gcc43-pr34535.patch

35 lines
1.1 KiB
Diff

2007-12-20 Jakub Jelinek <jakub@redhat.com>
PR debug/34535
* tree-mudflap.c (mf_make_builtin): Make decl artificial
and don't emit debug info for it.
PR debug/34535
* cp-lang.c (cp_classify_record): Check TYPE_LANG_SPECIFIC
is non-NULL before testing CLASSTYPE_DECLARED_CLASS.
--- gcc/cp/cp-lang.c.jj 2007-12-16 12:36:16.000000000 +0100
+++ gcc/cp/cp-lang.c 2007-12-20 10:58:19.000000000 +0100
@@ -159,7 +159,7 @@ cxx_dwarf_name (tree t, int verbosity)
static enum classify_record
cp_classify_record (tree type)
{
- if (CLASSTYPE_DECLARED_CLASS (type))
+ if (TYPE_LANG_SPECIFIC (type) && CLASSTYPE_DECLARED_CLASS (type))
return RECORD_IS_CLASS;
return RECORD_IS_STRUCT;
--- gcc/tree-mudflap.c.jj 2007-08-13 15:11:18.000000000 +0200
+++ gcc/tree-mudflap.c 2007-12-20 11:15:01.000000000 +0100
@@ -301,6 +301,10 @@ mf_make_builtin (enum tree_code category
TREE_PUBLIC (decl) = 1;
DECL_EXTERNAL (decl) = 1;
lang_hooks.decls.pushdecl (decl);
+ /* The decl was declared by the compiler. */
+ DECL_ARTIFICIAL (decl) = 1;
+ /* And we don't want debug info for it. */
+ DECL_IGNORED_P (decl) = 1;
return decl;
}