* dwarf2out.c (dwarf2out_imported_module_or_decl_1): Emit
DW_TAG_imported_module even if decl is IMPORTED_DECL with
NAMESPACE_DECL in its DECL_INITIAL.
* cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
on IMPORTED_DECL.
* g++.dg/debug/dwarf2/imported-module-2.C: Expect
DW_TAG_imported_module, not just any DW_TAG_imported prefixed tag.
* g++.dg/debug/dwarf2/imported-module-3.C: Likewise.
* g++.dg/debug/dwarf2/imported-module-4.C: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144911
138bc75d-0d04-0410-961f-
82ee72b054a4
2009-03-17 Jakub Jelinek <jakub@redhat.com>
+ PR debug/39471
+ * dwarf2out.c (dwarf2out_imported_module_or_decl_1): Emit
+ DW_TAG_imported_module even if decl is IMPORTED_DECL with
+ NAMESPACE_DECL in its DECL_INITIAL.
+
PR middle-end/39443
* optabs.c (set_user_assembler_libfunc): New function.
* expr.h (set_user_assembler_libfunc): New prototype.
+2009-03-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/39471
+ * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
+ on IMPORTED_DECL.
+
2009-03-09 Jakub Jelinek <jakub@redhat.com>
PR c++/39371
IMPORTED_DECL_ASSOCIATED_DECL (using_directive)
= TREE_OPERAND (*expr_p, 0);
- DECL_NAME (using_directive)
- = DECL_NAME (TREE_OPERAND (*expr_p, 0));
TREE_CHAIN (using_directive) = BLOCK_VARS (block);
BLOCK_VARS (block) = using_directive;
}
}
else if (TREE_CODE (decl) == IMPORTED_DECL)
{
- tree imported_ns_decl;
+ tree imported_ns_decl = IMPORTED_DECL_ASSOCIATED_DECL (decl);
/* IMPORTED_DECL nodes that are not imported namespace are just not
supported yet. */
- gcc_assert (DECL_INITIAL (decl)
- && TREE_CODE (DECL_INITIAL (decl)) == NAMESPACE_DECL);
- imported_ns_decl = DECL_INITIAL (decl);
+ gcc_assert (imported_ns_decl
+ && TREE_CODE (imported_ns_decl) == NAMESPACE_DECL);
at_import_die = lookup_decl_die (imported_ns_decl);
if (!at_import_die)
at_import_die = force_decl_die (imported_ns_decl);
}
}
- if (TREE_CODE (decl) == NAMESPACE_DECL)
+ if (TREE_CODE (decl) == NAMESPACE_DECL
+ || (TREE_CODE (decl) == IMPORTED_DECL
+ && (TREE_CODE (IMPORTED_DECL_ASSOCIATED_DECL (decl))
+ == NAMESPACE_DECL)))
imported_die = new_die (DW_TAG_imported_module,
lexical_block_die,
lexical_block);
2009-03-17 Jakub Jelinek <jakub@redhat.com>
+ PR debug/39471
+ * g++.dg/debug/dwarf2/imported-module-2.C: Expect
+ DW_TAG_imported_module, not just any DW_TAG_imported prefixed tag.
+ * g++.dg/debug/dwarf2/imported-module-3.C: Likewise.
+ * g++.dg/debug/dwarf2/imported-module-4.C: Likewise.
+
PR middle-end/39443
* gcc.dg/pr39443.c: New test.
// Origin: PR debug/38390
// { dg-do compile }
// { dg-options "-g -dA" }
-// { dg-final { scan-assembler "DW_TAG_imported" } }
+// { dg-final { scan-assembler "DW_TAG_imported_module" } }
namespace A
{
// PR debug/39379
// { dg-do compile }
// { dg-options "-g -dA" }
-// { dg-final { scan-assembler "DW_TAG_imported" } }
+// { dg-final { scan-assembler "DW_TAG_imported_module" } }
namespace A
{
// PR debug/39379
// { dg-do compile }
// { dg-options "-g -dA" }
-// { dg-final { scan-assembler "DW_TAG_imported" } }
+// { dg-final { scan-assembler "DW_TAG_imported_module" } }
namespace A
{