Commit a3f596ba by Jakub Jelinek Committed by Jakub Jelinek

re PR debug/39471 (DW_TAG_imported_module should be used (not DW_TAG_imported_declaration))

	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.

	* 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.

From-SVN: r144911
parent 6b2b8871
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
......
......@@ -593,8 +593,6 @@ cp_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
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;
}
......
......@@ -15380,12 +15380,11 @@ dwarf2out_imported_module_or_decl_1 (tree decl,
}
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);
......@@ -15414,7 +15413,10 @@ dwarf2out_imported_module_or_decl_1 (tree 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.
......
......@@ -2,7 +2,7 @@
// 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
{
......
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