public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/97599] [8/9/10/11 Regression] missing unspecified_parameters DIE in DWARF for functions with variable arguments Date: Wed, 28 Oct 2020 09:58:37 +0000 [thread overview] Message-ID: <bug-97599-4-miNl9NidHj@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-97599-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97599 --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Another version of the patch: --- gcc/dwarf2out.c.jj 2020-10-27 18:38:00.001979404 +0100 +++ gcc/dwarf2out.c 2020-10-28 10:52:29.618796758 +0100 @@ -22756,6 +22756,7 @@ gen_subprogram_die (tree decl, dw_die_re tree origin = decl_ultimate_origin (decl); dw_die_ref subr_die; dw_die_ref old_die = lookup_decl_die (decl); + bool old_die_had_no_children = false; /* This function gets called multiple times for different stages of the debug process. For example, for func() in this code: @@ -22846,6 +22847,9 @@ gen_subprogram_die (tree decl, dw_die_re if (old_die && declaration) return; + if (in_lto_p && old_die && old_die->die_child == NULL) + old_die_had_no_children = true; + /* Now that the C++ front end lazily declares artificial member fns, we might need to retrofit the declaration into its class. */ if (!declaration && !origin && !old_die @@ -23365,6 +23369,10 @@ gen_subprogram_die (tree decl, dw_die_re else if (DECL_INITIAL (decl) == NULL_TREE) gen_unspecified_parameters_die (decl, subr_die); } + else if ((subr_die != old_die || old_die_had_no_children) + && prototype_p (TREE_TYPE (decl)) + && stdarg_p (TREE_TYPE (decl))) + gen_unspecified_parameters_die (decl, subr_die); } if (subr_die != old_die)
next prev parent reply other threads:[~2020-10-28 9:58 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-27 17:09 [Bug debug/97599] New: " jakub at gcc dot gnu.org 2020-10-27 17:09 ` [Bug debug/97599] " jakub at gcc dot gnu.org 2020-10-28 7:41 ` rguenth at gcc dot gnu.org 2020-10-28 7:43 ` rguenth at gcc dot gnu.org 2020-10-28 9:10 ` rguenth at gcc dot gnu.org 2020-10-28 9:16 ` jakub at gcc dot gnu.org 2020-10-28 9:58 ` jakub at gcc dot gnu.org [this message] 2020-10-28 10:00 ` rguenth at gcc dot gnu.org 2020-11-14 8:15 ` cvs-commit at gcc dot gnu.org 2020-11-25 11:56 ` cvs-commit at gcc dot gnu.org 2020-11-25 17:18 ` [Bug debug/97599] [8/9 " jakub at gcc dot gnu.org 2021-04-20 23:30 ` cvs-commit at gcc dot gnu.org 2021-04-22 16:48 ` cvs-commit at gcc dot gnu.org 2021-04-22 17:07 ` jakub 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-97599-4-miNl9NidHj@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: 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).