This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[google/gcc-4_8] Fix ICE in output_pubname
- From: ccoutant at google dot com (Cary Coutant)
- To: gcc-patches at gcc dot gnu dot org, saugustine at google dot com
- Date: Fri, 28 Jun 2013 11:37:53 -0700
- Subject: [google/gcc-4_8] Fix ICE in output_pubname
This patch is for the google/gcc-4_8 branch.
A namespace alias entry can cause a DW_TAG_imported_declaration DIE to be
added to the pubnames table, but we don't handle that case when generating
the .debug_gnu_pubnames table.
2013-06-28 <ccoutant@google.com>
* gcc/dwarf2out.c (output_pubname): Fix global/static flag for
type DIEs. Handle DW_TAG_imported_declaration.
Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c (revision 200549)
+++ gcc/dwarf2out.c (working copy)
@@ -9147,6 +9147,7 @@ output_pubname (dw_offset die_offset, pu
GDB_INDEX_SYMBOL_STATIC_SET_VALUE(flags, is_static);
break;
case DW_TAG_namespace:
+ case DW_TAG_imported_declaration:
GDB_INDEX_SYMBOL_KIND_SET_VALUE(flags, GDB_INDEX_SYMBOL_KIND_TYPE);
break;
case DW_TAG_class_type:
@@ -9155,7 +9156,8 @@ output_pubname (dw_offset die_offset, pu
case DW_TAG_union_type:
case DW_TAG_enumeration_type:
GDB_INDEX_SYMBOL_KIND_SET_VALUE(flags, GDB_INDEX_SYMBOL_KIND_TYPE);
- GDB_INDEX_SYMBOL_STATIC_SET_VALUE(flags, 1);
+ if (!is_cxx () && !is_java ())
+ GDB_INDEX_SYMBOL_STATIC_SET_VALUE(flags, 1);
break;
default:
gcc_unreachable ();