public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com> To: jason@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: c++/6381: [PATCH] Missing assembler label Date: Wed, 08 May 2002 06:36:00 -0000 [thread overview] Message-ID: <20020508133601.28341.qmail@sources.redhat.com> (raw) 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 (); } } --=-=-=--
next reply other threads:[~2002-05-08 13:36 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-05-08 6:36 Jason Merrill [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-05-08 12:36 Mark Mitchell 2002-05-07 14:06 Richard Henderson 2002-05-07 10:26 Mark Mitchell 2002-05-07 8:16 Jason Merrill
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020508133601.28341.qmail@sources.redhat.com \ --to=jason@redhat.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=jason@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).