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]

Re: gcc/gcc ChangeLog dbxout.c


Richard Henderson wrote:
> On Thu, Feb 17, 2005 at 12:39:16AM +0100, uweigand@de.ibm.com wrote:
> > This change
> > 
> > +  /* The N_FUN tag at the end of the function is a GNU extension,
> > +     which may be undesirable, and is unnecessary if we do not have
> > +     named sections.  */
> > +  if (!use_gnu_debug_info_extensions
> > +      || NO_DBX_FUNCTION_END
> > +      || !targetm.have_named_sections
> > +      || DECL_IGNORED_P (decl))
> > +    return;
> > +
> >    /* The Lscope label must be emitted even if we aren't doing anything
> >       else; dbxout_block needs it.  */
> >    function_section (current_function_decl);
> > 
> > breaks -gstabs output for the very reason mentioned in the above
> > comment: dbxout_block will emit references to the Lscope label,
> > which is now undefined after your change ...
> > 
> > This causes gcc.dg/20041216-1.c to fail on s390.
> 
> Then revert the change and work with Stuart to come to some resolution.

What about just moving the check back after emitting the Lscope label,
like in the following patch?

Bye,
Ulrich


ChangeLog:

	* dbxout.c (dbxout_function_end): Emit Lscope label always.

Index: gcc/dbxout.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dbxout.c,v
retrieving revision 1.220
diff -c -p -r1.220 dbxout.c
*** gcc/dbxout.c	16 Feb 2005 19:01:29 -0000	1.220
--- gcc/dbxout.c	17 Feb 2005 14:00:27 -0000
*************** dbxout_function_end (tree decl)
*** 907,921 ****
  {
    char lscope_label_name[100];
  
-   /* The N_FUN tag at the end of the function is a GNU extension,
-      which may be undesirable, and is unnecessary if we do not have
-      named sections.  */
-   if (!use_gnu_debug_info_extensions
-       || NO_DBX_FUNCTION_END
-       || !targetm.have_named_sections
-       || DECL_IGNORED_P (decl))
-     return;
- 
    /* The Lscope label must be emitted even if we aren't doing anything
       else; dbxout_block needs it.  */
    function_section (current_function_decl);
--- 907,912 ----
*************** dbxout_function_end (tree decl)
*** 927,932 ****
--- 918,932 ----
    targetm.asm_out.internal_label (asm_out_file, "Lscope", scope_labelno);
    scope_labelno++;
  
+   /* The N_FUN tag at the end of the function is a GNU extension,
+      which may be undesirable, and is unnecessary if we do not have
+      named sections.  */
+   if (!use_gnu_debug_info_extensions
+       || NO_DBX_FUNCTION_END
+       || !targetm.have_named_sections
+       || DECL_IGNORED_P (decl))
+     return;
+ 
    /* By convention, GCC will mark the end of a function with an N_FUN
       symbol and an empty string.  */
  #ifdef DBX_OUTPUT_NFUN


-- 
  Dr. Ulrich Weigand
  Linux on zSeries Development
  Ulrich.Weigand@de.ibm.com


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