This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[google/gcc-4_6] Fix -gfission issue in index_location_lists (issue6248072)


This patch is for the google/gcc-4_6 branch. It fixes an issue that
causes the .debug_addr section to be twice as big as it should be.

Tested on x86_64 and ran validate_failures.py. Also tested by
building an internal application and verifying correct behavior.


2012-05-30   Cary Coutant  <ccoutant@google.com>

	* gcc/dwarf2out.c (index_location_lists): Don't index location
	lists that have already been indexed.


Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c	(revision 187983)
+++ gcc/dwarf2out.c	(working copy)
@@ -24269,8 +24269,10 @@ index_location_lists (dw_die_ref die)
           {
             dw_attr_node attr;
 
-            /* Don't index an entry that won't be output.  */
-            if (strcmp (curr->begin, curr->end) == 0)
+            /* Don't index an entry that has already been indexed
+	       or won't be output.  */
+            if (curr->begin_index != -1U
+	        || strcmp (curr->begin, curr->end) == 0)
               continue;
 
             attr.dw_attr = DW_AT_location;

--
This patch is available for review at http://codereview.appspot.com/6248072


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]