public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/108772] [13 Regression] ICE in force_decl_die, at dwarf2out.cc:26751 since r13-4161-g32d16fe9d7e347bc
Date: Fri, 03 Mar 2023 07:27:36 +0000	[thread overview]
Message-ID: <bug-108772-4-ORHG9NGQWa@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108772-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108772

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:33ca5c92dfa7e2f591a838bb768d9d6eea56793b

commit r13-6438-g33ca5c92dfa7e2f591a838bb768d9d6eea56793b
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Mar 1 10:01:10 2023 +0100

    debug/108772 - ICE with late debug generated with -flto

    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 DIEs from dwarf2out_late_global_decl in the in_lto_p path
    for function scope globals but 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.

            PR debug/108772
            * dwarf2out.cc (dwarf2out_late_global_decl): Do not
            generate a DIE for a function scope static.

            * g++.dg/lto/pr108772_0.C: New testcase.

  parent reply	other threads:[~2023-03-03  7:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-13 12:06 [Bug c++/108772] New: " marxin at gcc dot gnu.org
2023-02-13 12:06 ` [Bug debug/108772] " marxin at gcc dot gnu.org
2023-02-13 12:35 ` jakub at gcc dot gnu.org
2023-02-13 14:00 ` marxin at gcc dot gnu.org
2023-02-13 15:14 ` rguenth at gcc dot gnu.org
2023-02-14 11:50 ` rguenth at gcc dot gnu.org
2023-02-14 12:22 ` rguenth at gcc dot gnu.org
2023-02-20 13:37 ` rguenth at gcc dot gnu.org
2023-02-21 12:26 ` rguenth at gcc dot gnu.org
2023-02-21 12:48 ` rguenth at gcc dot gnu.org
2023-02-21 13:32 ` rguenth at gcc dot gnu.org
2023-03-03  7:27 ` cvs-commit at gcc dot gnu.org [this message]
2023-03-03  7:34 ` rguenth at gcc dot gnu.org

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=bug-108772-4-ORHG9NGQWa@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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: 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).