public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "stilor at att dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/94273] [10 Regression] ICE in splice_child_die, at dwarf2out.c:5657 since r10-7235-g52b3aa8be1893848
Date: Thu, 26 Mar 2020 19:01:08 +0000 [thread overview]
Message-ID: <bug-94273-4-WPkjsgh7uL@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94273-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94273
--- Comment #7 from Alexey Neyman <stilor at att dot net> ---
(In reply to Richard Biener from comment #6)
> (In reply to Alexey Neyman from comment #4)
> > Or add a similar "return if debug level is terse" at the beginning of
> > `gen_type_die` - I didn't notice that in C++ it could also get called not
> > through the `add_type_attribute`:
> >
> > ```
> > diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
> > index 89e52a41508..b0f6680bd61 100644
> > --- a/gcc/dwarf2out.c
> > +++ b/gcc/dwarf2out.c
> > @@ -25709,6 +25709,9 @@ gen_type_die_with_usage (tree type, dw_die_ref
> > context_die,
> > static void
> > gen_type_die (tree type, dw_die_ref context_die)
> > {
> > + if (debug_info_level <= DINFO_LEVEL_TERSE)
> > + return;
> > +
> > if (type != error_mark_node)
> > {
> > gen_type_die_with_usage (type, context_die, DINFO_USAGE_DIR_USE);
> > ```
> >
> > I verified that it makes the attached test case compile successfully.
>
> But then the static var is improperly scoped in the debug info? IMHO
> it's better left out.
First, which static variable? The test case for this PR does not have any
static vars:
```
class a {
virtual void c() {}
} extern b;
a b;
```
As to DECL_FILE_SCOPE_P check, do you mean something like this?
```
@@ -26360,7 +26365,8 @@ gen_decl_die (tree decl, tree origin, struct
vlr_context *ctx,
variable declarations or definitions unless it is external. */
if (debug_info_level < DINFO_LEVEL_TERSE
|| (debug_info_level == DINFO_LEVEL_TERSE
- && !TREE_PUBLIC (decl_or_origin)))
+ && (!TREE_PUBLIC (decl_or_origin)
+ || !DECL_FILE_SCOPE_P(decl_or_origin))))
break;
if (debug_info_level > DINFO_LEVEL_TERSE) {
@@ -26841,7 +26847,8 @@ dwarf2out_decl (tree decl)
variable declarations or definitions unless it is external. */
if (debug_info_level < DINFO_LEVEL_TERSE
|| (debug_info_level == DINFO_LEVEL_TERSE
- && !TREE_PUBLIC (decl)))
+ && (!TREE_PUBLIC (decl)
+ || !DECL_FILE_SCOPE_P(decl))))
return;
break;
```
This change doesn't resolve the ICE with that test.
I am going to attach a patch with what I suggested. Whether it is accepted, or
something different needs to be done - I don't have commit access, so somebody
else will have to commit it.
next prev parent reply other threads:[~2020-03-26 19:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-23 11:20 [Bug c++/94273] New: ice in splice_child_die, at dwarf2out.c:5657 dcb314 at hotmail dot com
2020-03-23 11:28 ` [Bug c++/94273] " dcb314 at hotmail dot com
2020-03-23 11:41 ` dcb314 at hotmail dot com
2020-03-23 12:55 ` [Bug debug/94273] [10 Regression] ICE in splice_child_die, at dwarf2out.c:5657 since r10-7235-g52b3aa8be1893848 marxin at gcc dot gnu.org
2020-03-23 12:55 ` marxin at gcc dot gnu.org
2020-03-23 14:08 ` rguenth at gcc dot gnu.org
2020-03-23 19:53 ` stilor at att dot net
2020-03-26 13:12 ` jakub at gcc dot gnu.org
2020-03-26 13:21 ` rguenth at gcc dot gnu.org
2020-03-26 19:01 ` stilor at att dot net [this message]
2020-03-26 23:39 ` stilor at att dot net
2020-03-27 8:37 ` rguenth at gcc dot gnu.org
2020-03-27 8:46 ` rguenth at gcc dot gnu.org
2020-03-27 13:01 ` cvs-commit at gcc dot gnu.org
2020-03-27 13:01 ` 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-94273-4-WPkjsgh7uL@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).