diff options
author | Richard Guenther <rguenther@suse.de> | 2011-12-20 09:49:17 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-12-20 09:49:17 +0000 |
commit | 336e404f9f34492e5304ba3de2d618d0cc90c8fa (patch) | |
tree | 2eab06d87de7651e56e1242fcfd62ee223d43b5a | |
parent | d8ab827382b314eca193be787b96b2a8c8e3b454 (diff) | |
download | gcc-336e404f9f34492e5304ba3de2d618d0cc90c8fa.zip gcc-336e404f9f34492e5304ba3de2d618d0cc90c8fa.tar.gz gcc-336e404f9f34492e5304ba3de2d618d0cc90c8fa.tar.bz2 |
re PR debug/46796 (debug info missing builtin type names with lto)
2011-12-20 Richard Guenther <rguenther@suse.de>
PR lto/46796
* dwarf2out.c (modified_type_die): When the type variant
chain is corrupt use the types name, if available, instead
of __unknown__.
From-SVN: r182524
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 9 |
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 32c1d24..2dd1cc0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-12-20 Richard Guenther <rguenther@suse.de> + + PR lto/46796 + * dwarf2out.c (modified_type_die): When the type variant + chain is corrupt use the types name, if available, instead + of __unknown__. + 2011-12-20 Tristan Gingold <gingold@adacore.com> * config/alpha/alpha.c (alpha_start_function): Adjust condition to diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index d5f469c..8de3613 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -9873,7 +9873,14 @@ modified_type_die (tree type, int is_const_type, int is_volatile_type, } /* This probably indicates a bug. */ else if (mod_type_die && mod_type_die->die_tag == DW_TAG_base_type) - add_name_attribute (mod_type_die, "__unknown__"); + { + name = TYPE_NAME (type); + if (name + && TREE_CODE (name) == TYPE_DECL) + name = DECL_NAME (name); + add_name_attribute (mod_type_die, + name ? IDENTIFIER_POINTER (name) : "__unknown__"); + } if (qualified_type) equate_type_number_to_die (qualified_type, mod_type_die); |