Patchwork [google/gcc-4_8] Fix ICE in output_pubname

login
register
mail settings
Submitter Cary Coutant
Date June 28, 2013, 6:37 p.m.
Message ID <20130628183753.5CDD9160809@ccoutant.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/255519/
State New
Headers show

Comments

Cary Coutant - June 28, 2013, 6:37 p.m.
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.

Patch

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 ();