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]

(bootstrap-debug) create complex-type decls regardless of debug info


I'm not sure this patch is needed for bootstrap-debug (that I'm about
to install) to succeed, but it surely makes it far easier to compare
-fdump-tree-all-all outputs for actual differences.  Also, since in
the absence of this patch decl uids are off by a few, and such uids
are used as hashes in some hash tables that are later iterated over
slot by slot, it is possible that this uid difference could actually
cause different code to be emitted with or without -g, if some of the
hash uids wrap around and end up affecting the walk order.  I don't
have a testcase that demonstrates this, though.  I hope it's not
necessary.

:ADDPATCH debug:

Bootstrap-tested on x86_64-linux-gnu.  Ok to install?

for  gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* tree.c (build_complex_type): Don't use the need for debug
	info to decide whether to create decls for complex types.

Index: gcc/tree.c
===================================================================
--- gcc/tree.c.orig	2007-08-15 22:34:41.000000000 -0300
+++ gcc/tree.c	2007-08-15 22:41:32.000000000 -0300
@@ -5985,10 +5985,10 @@ build_complex_type (tree component_type)
 	  = build_complex_type (TYPE_CANONICAL (component_type));
     }
 
-  /* If we are writing Dwarf2 output we need to create a name,
-     since complex is a fundamental type.  */
-  if ((write_symbols == DWARF2_DEBUG || write_symbols == VMS_AND_DWARF2_DEBUG)
-      && ! TYPE_NAME (t))
+  /* If we are writing Dwarf2 output we need to create a name, since
+     complex is a fundamental type.  Always create it, so as to make
+     it easier to compare debug dumps.  */
+  if (! TYPE_NAME (t))
     {
       const char *name;
       if (component_type == char_type_node)
-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member         http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

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