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]

Patch to preserve programmer specified labels in flow.c


Hi Guys,

  I would like to submit the following patch for approval.  It changes
  the function can_delete_label_p so that programmer specified labels
  can no longer be deleted.  Without this patch bad debug information
  can be generated for programmer specified labels which have been
  optimised away.

Cheers
	Nick


Thu Mar 18 13:00:55 1999  Nick Clifton  <nickc@cygnus.com>

	* flow.c (can_delete_label_p): Do not allow user specified
	labels to be deleted.

Index: gcc/flow.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/flow.c,v
retrieving revision 1.106
diff -p -w -r1.106 flow.c
*** flow.c	1999/03/17 21:58:48	1.106
--- flow.c	1999/03/18 21:00:37
*************** can_delete_label_p (label)
*** 1783,1788 ****
--- 1783,1792 ----
    if (LABEL_PRESERVE_P (label))
      return 0;
  
+   /* User declared labels must be preserved.  */
+   if (LABEL_NAME (label) != 0)
+     return 0;
+   
    for (x = forced_labels; x ; x = XEXP (x, 1))
      if (label == XEXP (x, 0))
        return 0;


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