public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/6381: [PATCH] Missing assembler label
@ 2002-05-07  8:16 Jason Merrill
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Merrill @ 2002-05-07  8:16 UTC (permalink / raw)
  To: jason; +Cc: gcc-prs

The following reply was made to PR c++/6381; it has been noted by GNATS.

From: Jason Merrill <jason@redhat.com>
To: gcc-patches@gcc.gnu.org
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/6381: [PATCH] Missing assembler label
Date: Tue, 07 May 2002 16:14:22 +0100

 --=-=-=
 
 6381 is a regression whereby compiling with -g -O causes us to end up with
 an undefined reference to a static local variable because we wrote out the
 initializer for another variable in dwarf2out.  The simple fix is to
 disable the problematic code; it means that the debug info will be somewhat
 less useful for unexpanded constants, but is safe.
 
 Mark, can this go onto the branch?  I'll work on a better fix for the trunk.
 
 2002-05-07  Jason Merrill  <jason@redhat.com>
 
 	* dwarf2out.c (rtl_for_decl_location): Don't try to extract a
 	constant value from DECL_INITIAL.
 
 
 --=-=-=
 Content-Type: text/x-patch
 Content-Disposition: inline
 
 *** dwarf2out.c.~1~	Sun May  5 22:06:08 2002
 --- dwarf2out.c	Tue May  7 16:08:53 2002
 *************** rtl_for_decl_location (decl)
 *** 8942,8947 ****
 --- 8946,8955 ----
   	    rtl = gen_rtx_CONST_STRING (VOIDmode, TREE_STRING_POINTER (init));
   	}
   
 + #if 0
 +       /* We mustn't actually emit anything here, as we might not get a
 +          chance to emit any symbols we refer to.  For the release, don't
 +          try to get this right.  */
         if (rtl == NULL)
   	{
   	  rtl = expand_expr (DECL_INITIAL (decl), NULL_RTX, VOIDmode,
 *************** rtl_for_decl_location (decl)
 *** 8951,8956 ****
 --- 8959,8965 ----
   	  if (rtl && GET_CODE (rtl) == MEM)
   	    rtl = NULL;
   	}
 + #endif
       }
   
   #ifdef ASM_SIMPLIFY_DWARF_ADDR
 
 --=-=-=--


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: c++/6381: [PATCH] Missing assembler label
@ 2002-05-08 12:36 Mark Mitchell
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Mitchell @ 2002-05-08 12:36 UTC (permalink / raw)
  To: jason; +Cc: gcc-prs

The following reply was made to PR c++/6381; it has been noted by GNATS.

From: Mark Mitchell <mark@codesourcery.com>
To: Jason Merrill <jason@redhat.com>, Richard Henderson <rth@redhat.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
   "gcc-gnats@gcc.gnu.org" <gcc-gnats@gcc.gnu.org>
Subject: Re: c++/6381: [PATCH] Missing assembler label
Date: Wed, 08 May 2002 12:28:25 -0700

 > Bootstrapping now; will apply to the trunk when done, and to the branch
 > after 3.1.  Or now, if Mark would prefer.
 
 He wouldn't.
 
 He would prefer shared library versioning had never been invented, just
 at the moment, thank you very much. :-)
 
 Thanks,
 
 --
 Mark Mitchell                   mark@codesourcery.com
 CodeSourcery, LLC               http://www.codesourcery.com
 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: c++/6381: [PATCH] Missing assembler label
@ 2002-05-08  6:36 Jason Merrill
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Merrill @ 2002-05-08  6:36 UTC (permalink / raw)
  To: jason; +Cc: gcc-prs

The following reply was made to PR c++/6381; it has been noted by GNATS.

From: Jason Merrill <jason@redhat.com>
To: Richard Henderson <rth@redhat.com>
Cc: gcc-patches@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: Re: c++/6381: [PATCH] Missing assembler label
Date: Wed, 08 May 2002 14:32:40 +0100

 --=-=-=
 
 >>>>> "Richard" == Richard Henderson <rth@redhat.com> writes:
 
 > On Tue, May 07, 2002 at 04:14:22PM +0100, Jason Merrill wrote:
 >> 6381 is a regression whereby compiling with -g -O causes us to end up with
 >> an undefined reference to a static local variable because we wrote out the
 >> initializer for another variable in dwarf2out.  The simple fix is to
 >> disable the problematic code; it means that the debug info will be somewhat
 >> less useful for unexpanded constants, but is safe.
 
 > Hum.  Wouldn't it be more useful to allow at least INTEGER_CST?
 
 > Oh well, perhaps your better fix can be moved to 3.1.1.
 
 That's what I was thinking.  Here's a patch that allows a bit more; doing
 any better would require some sort of support for speculative expansion,
 and I'm not sure it would be much of a win.
 
 Bootstrapping now; will apply to the trunk when done, and to the branch
 after 3.1.  Or now, if Mark would prefer.
 
 2002-05-08  Jason Merrill  <jason@redhat.com>
 
 	* dwarf2out.c (rtl_for_decl_location): Only expand INTEGER_CST and
 	REAL_CST.
 
 
 --=-=-=
 Content-Type: text/x-patch
 Content-Disposition: inline
 
 *** dwarf2out.c.~1~	Sun May  5 22:06:08 2002
 --- dwarf2out.c	Wed May  8 14:16:58 2002
 *************** rtl_for_decl_location (decl)
 *** 8941,8955 ****
   		  == strlen (TREE_STRING_POINTER (init)) + 1))
   	    rtl = gen_rtx_CONST_STRING (VOIDmode, TREE_STRING_POINTER (init));
   	}
 ! 
 !       if (rtl == NULL)
   	{
   	  rtl = expand_expr (DECL_INITIAL (decl), NULL_RTX, VOIDmode,
   			     EXPAND_INITIALIZER);
 ! 	  /* If expand_expr returned a MEM, we cannot use it, since
 ! 	     it won't be output, leading to unresolved symbol.  */
   	  if (rtl && GET_CODE (rtl) == MEM)
 ! 	    rtl = NULL;
   	}
       }
   
 --- 8941,8957 ----
   		  == strlen (TREE_STRING_POINTER (init)) + 1))
   	    rtl = gen_rtx_CONST_STRING (VOIDmode, TREE_STRING_POINTER (init));
   	}
 !       /* If the initializer is something that we know will expand into an
 ! 	 immediate RTL constant, expand it now.  Expanding anything else
 ! 	 tends to produce unresolved symbols; see debug/5770 and c++/6381.  */
 !       else if (TREE_CODE (DECL_INITIAL (decl)) == INTEGER_CST
 ! 	       || TREE_CODE (DECL_INITIAL (decl)) == REAL_CST)
   	{
   	  rtl = expand_expr (DECL_INITIAL (decl), NULL_RTX, VOIDmode,
   			     EXPAND_INITIALIZER);
 ! 	  /* If expand_expr returns a MEM, it wasn't immediate.  */
   	  if (rtl && GET_CODE (rtl) == MEM)
 ! 	    abort ();
   	}
       }
   
 
 --=-=-=--


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: c++/6381: [PATCH] Missing assembler label
@ 2002-05-07 14:06 Richard Henderson
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2002-05-07 14:06 UTC (permalink / raw)
  To: jason; +Cc: gcc-prs

The following reply was made to PR c++/6381; it has been noted by GNATS.

From: Richard Henderson <rth@redhat.com>
To: Jason Merrill <jason@redhat.com>
Cc: gcc-patches@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: Re: c++/6381: [PATCH] Missing assembler label
Date: Tue, 7 May 2002 13:57:37 -0700

 On Tue, May 07, 2002 at 04:14:22PM +0100, Jason Merrill wrote:
 > 6381 is a regression whereby compiling with -g -O causes us to end up with
 > an undefined reference to a static local variable because we wrote out the
 > initializer for another variable in dwarf2out.  The simple fix is to
 > disable the problematic code; it means that the debug info will be somewhat
 > less useful for unexpanded constants, but is safe.
 
 Hum.  Wouldn't it be more useful to allow at least INTEGER_CST?
 
 Oh well, perhaps your better fix can be moved to 3.1.1.
 
 
 r~


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: c++/6381: [PATCH] Missing assembler label
@ 2002-05-07 10:26 Mark Mitchell
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Mitchell @ 2002-05-07 10:26 UTC (permalink / raw)
  To: jason; +Cc: gcc-prs

The following reply was made to PR c++/6381; it has been noted by GNATS.

From: Mark Mitchell <mark@codesourcery.com>
To: Jason Merrill <jason@redhat.com>,
   "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: "gcc-gnats@gcc.gnu.org" <gcc-gnats@gcc.gnu.org>
Subject: Re: c++/6381: [PATCH] Missing assembler label
Date: Tue, 07 May 2002 10:12:35 -0700

 --On Tuesday, May 07, 2002 04:14:22 PM +0100 Jason Merrill 
 <jason@redhat.com> wrote:
 
 > 6381 is a regression whereby compiling with -g -O causes us to end up with
 > an undefined reference to a static local variable because we wrote out the
 > initializer for another variable in dwarf2out.  The simple fix is to
 > disable the problematic code; it means that the debug info will be
 > somewhat less useful for unexpanded constants, but is safe.
 >
 > Mark, can this go onto the branch?  I'll work on a better fix for the
 > trunk.
 
 Yes, thanks.
 
 --
 Mark Mitchell                   mark@codesourcery.com
 CodeSourcery, LLC               http://www.codesourcery.com
 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-05-08 19:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-07  8:16 c++/6381: [PATCH] Missing assembler label Jason Merrill
2002-05-07 10:26 Mark Mitchell
2002-05-07 14:06 Richard Henderson
2002-05-08  6:36 Jason Merrill
2002-05-08 12:36 Mark Mitchell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).