[PATCH] PR/8354

Devang Patel dpatel@apple.com
Sun Feb 1 20:54:00 GMT 2004


While emitting new type die, reuse existing one if available.

Bootstrapped and tested on i686-pc-linux-gnu.
GCC, libstdc++ and GDB DejaGNU tests do not report any new
regression.

OK for mainline?
Thank you,
--
Devang

2004-01-02  Devang Patel  <dpatel@apple.com>

         PR/8354
         *dwarf2out.c (modified_type_die): Reuse existing type die.

Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.483
diff -c -3 -p -r1.483 dwarf2out.c
*** dwarf2out.c 29 Jan 2004 18:42:56 -0000      1.483
--- dwarf2out.c 1 Feb 2004 20:43:06 -0000
*************** modified_type_die (tree type, int is_con
*** 7964,7969 ****
--- 7964,7977 ----
           /* Else cv-qualified version of named type; fall through.  */
         }

+       /* Just reuse the type die, if it exists.  */
+       if (!mod_type_die)
+       {
+         mod_type_die = lookup_type_die (type);
+         if (mod_type_die)
+           return mod_type_die;
+       }
+
         if (mod_type_die)
         /* OK.  */
         ;



More information about the Gcc-patches mailing list