aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2007-03-16 05:08:25 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2007-03-16 05:08:25 +0000
commit8857ae1c20b1a7efa789d7f95674043b3e49ac51 (patch)
treec07f79b5f6b1696929bc0a960575e32ab6389bd7 /gcc/dwarf2out.c
parent94fe33db53d3073d4bd3e4ee8d49b57db6a3d7ad (diff)
downloadgcc-8857ae1c20b1a7efa789d7f95674043b3e49ac51.zip
gcc-8857ae1c20b1a7efa789d7f95674043b3e49ac51.tar.gz
gcc-8857ae1c20b1a7efa789d7f95674043b3e49ac51.tar.bz2
re PR debug/29906 (-g option creates internal compiler error)
gcc/ChangeLog: PR debug/29906 * dwarf2out.c (force_type_die): Adjust comment. (dwarf2out_imported_module_or_decl): Handle base AT_import types. gcc/testsuite/ChangeLog: PR debug/29906 * g++.dg/debug/pr29906.C: New From-SVN: r122976
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 476f6eb..fa00452 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -13160,7 +13160,8 @@ force_decl_die (tree decl)
return decl_die;
}
-/* Returns the DIE for TYPE. A DIE is always returned. */
+/* Returns the DIE for TYPE, that must not be a base type. A DIE is
+ always returned. */
static dw_die_ref
force_type_die (tree type)
@@ -13488,7 +13489,12 @@ dwarf2out_imported_module_or_decl (tree decl, tree context)
/* For TYPE_DECL or CONST_DECL, lookup TREE_TYPE. */
if (TREE_CODE (decl) == TYPE_DECL || TREE_CODE (decl) == CONST_DECL)
- at_import_die = force_type_die (TREE_TYPE (decl));
+ {
+ if (is_base_type (TREE_TYPE (decl)))
+ at_import_die = base_type_die (TREE_TYPE (decl));
+ else
+ at_import_die = force_type_die (TREE_TYPE (decl));
+ }
else
{
at_import_die = lookup_decl_die (decl);