public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Eric Botcazou <ebotcazou@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-2930] Fix regression in debug info for Ada with DWARF 5 Date: Mon, 16 Aug 2021 13:27:17 +0000 (GMT) [thread overview] Message-ID: <20210816132717.C286D3947C38@sourceware.org> (raw) https://gcc.gnu.org/g:be024a1285840bf2fc47fcbde32375468a92ce05 commit r12-2930-gbe024a1285840bf2fc47fcbde32375468a92ce05 Author: Eric Botcazou <ebotcazou@gcc.gnu.org> Date: Mon Aug 16 15:26:22 2021 +0200 Fix regression in debug info for Ada with DWARF 5 add_scalar_info can directly generate a reference to an existing DIE for a scalar attribute, e.g the upper bound of a VLA, but it does so only if this existing DIE has a location or is a constant: if (get_AT (decl_die, DW_AT_location) || get_AT (decl_die, DW_AT_data_member_location) || get_AT (decl_die, DW_AT_const_value)) Now, in DWARF 5, members of a structure that are bitfields no longer have a DW_AT_data_member_location but a DW_AT_data_bit_offset attribute instead, so the condition is bypassed. gcc/ * dwarf2out.c (add_scalar_info): Deal with DW_AT_data_bit_offset. Diff: --- gcc/dwarf2out.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 4bcd3313fee..ba0a6d6ed60 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -21253,6 +21253,7 @@ add_scalar_info (dw_die_ref die, enum dwarf_attribute attr, tree value, { if (get_AT (decl_die, DW_AT_location) || get_AT (decl_die, DW_AT_data_member_location) + || get_AT (decl_die, DW_AT_data_bit_offset) || get_AT (decl_die, DW_AT_const_value)) { add_AT_die_ref (die, attr, decl_die);
reply other threads:[~2021-08-16 13:27 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210816132717.C286D3947C38@sourceware.org \ --to=ebotcazou@gcc.gnu.org \ --cc=gcc-cvs@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).