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]

PATCH: small dwarf2out tweaks


The first hunk is a minor optimization.  The second is a sanity check
related to debug/6436.

Booted and tested i686-pc-linux-gnu.  Applied trunk only.

2002-05-08  Jason Merrill  <jason@redhat.com>

	* dwarf2out.c (output_call_frame_info): Don't emit a CIE with no FDEs.

	* dwarf2out.c (gen_type_die): Abort on broken recursion.

*** dwarf2out.c.~1~	Sun May  5 22:09:24 2002
--- dwarf2out.c	Wed May  8 14:07:01 2002
*************** output_call_frame_info (for_eh)
*** 1814,1819 ****
--- 1814,1823 ----
    int per_encoding = DW_EH_PE_absptr;
    int lsda_encoding = DW_EH_PE_absptr;
  
+   /* Don't emit a CIE if there won't be any FDEs.  */
+   if (fde_table_in_use == 0)
+     return;
+ 
    /* If we don't have any functions we'll want to unwind out of, don't emit any
       EH unwind information.  */
    if (for_eh)
*************** gen_type_die (type, context_die)
*** 11071,11076 ****
--- 11077,11086 ----
    if (TYPE_NAME (type) && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
        && DECL_ORIGINAL_TYPE (TYPE_NAME (type)))
      {
+       /* Prevent broken recursion; we can't hand off to the same type.  */
+       if (DECL_ORIGINAL_TYPE (TYPE_NAME (type)) == type)
+ 	abort ();
+ 
        TREE_ASM_WRITTEN (type) = 1;
        gen_decl_die (TYPE_NAME (type), context_die);
        return;

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