From: Jeff Law <jeffreyalaw@gmail.com>
To: Richard Biener <rguenther@suse.de>, gcc-patches@gcc.gnu.org
Cc: Jakub Jelinek <jakub@redhat.com>, jason@redhat.com
Subject: Re: [PATCH] debug/108772 - ICE with late debug generated with -flto
Date: Sat, 11 Mar 2023 13:08:25 -0700 [thread overview]
Message-ID: <0cb7a213-8247-025e-4a7a-62957c72b682@gmail.com> (raw)
In-Reply-To: <20230301130718.E51473858C62@sourceware.org>
On 3/1/23 06:07, Richard Biener via Gcc-patches wrote:
> When combining -g1 with -flto we run into the DIE location annotation
> machinery for globals calling dwarf2out_late_global_decl but not
> having any early generated DIE for function scope statics. In
> this process we'd generate a limbo DIE since also the function scope
> doesn't have any early generated DIE. The limbo handling then tries
> to force a DIE for the context chain which ultimatively fails and
> ICEs at the std namespace decl because at -g1 we don't represent that.
>
> The following avoids this situation by making sure to never generate
> any limbo DIEs from dwarf2out_late_global_decl in the in_lto_p path
> but instead for function scope globals rely on DIE generation for
> the function to output a DIE for the local static (which doesn't
> happen for -g1).
>
> I explored a lot of other options to fix this but in the end this
> seems to be the most spot-on fix with the least risk of unwanted
> effects.
>
> LTO bootstrapped on x86_64-unknown-linux-gnu (running into PR108984),
> bootstrapped and tested on x86_64-unknown-linux-gnu.
>
> OK?
>
> Thanks,
> Richard.
>
> PR debug/108772
> * dwarf2out.cc (dwarf2out_late_global_decl): Do not
> generate a DIE for a function scope static when we do
> not have a DIE for the function already.
>
> * g++.dg/lto/pr108772_0.C: New testcase.
OK.
jeff
next parent reply other threads:[~2023-03-11 20:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230301130718.E51473858C62@sourceware.org>
2023-03-11 20:08 ` Jeff Law [this message]
[not found] <01327.123030108070400465@us-mta-295.us.mimecast.lan>
2023-03-01 13:09 ` Jakub Jelinek
2023-03-01 20:11 ` Jason Merrill
2023-03-02 7:43 ` Richard Biener
2023-03-02 13:19 ` Jason Merrill
2023-03-01 13:07 Richard Biener
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=0cb7a213-8247-025e-4a7a-62957c72b682@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=jason@redhat.com \
--cc=rguenther@suse.de \
/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: link
Be 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).