public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
From: "tromey at sourceware dot org" <sourceware-bugzilla@sourceware.org>
To: dwz@sourceware.org
Subject: [Bug default/26987] GCC 11 Ada binaries contain unknown tags
Date: Wed, 02 Dec 2020 15:35:34 +0000	[thread overview]
Message-ID: <bug-26987-11298-tYFJfflKCT@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-26987-11298@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=26987

--- Comment #20 from Tom Tromey <tromey at sourceware dot org> ---
(In reply to Jakub Jelinek from comment #18)

> Strict reading of the spec says that constant class is
> DW_FORM_data{1,2,4,8,16},
> DW_FORM_{s,u}data and DW_FORM_implicit_const, at least in DWARF5.

I'd rather we not do strict readings of the spec, though,
unless the strict-dwarf setting is enabled.  DWARF extensibility
is useful.  In this case it is just for backward compatibility
of some kind, since the problem is solved in DWARF 5.

The problem with using sdata/udata is that it's unpredictable
when a 128-bit value might be needed.  This means all the
readers will have to handle this at the lowest level.  Using a
block form avoids this, because gdb can decide at certain points
to just drop things it doesn't understand.

Here's the internal test case that shows the issue.
A similar, but slightly different, test case is in gdb, see
gdb/testsuite/gdb.ada/fixed_points/fixed_points.adb.

Anyway save this as "test_case.adb" and then do:
$ gnatmake -g test_case

I see the subrange DIE in the test_case.abd CU.
I used today's gcc trunk.

with System;

procedure Test_Case is

   type Base_Fixed_Point_Type is
     delta 1.0 / 16.0
       range (System.Min_Int / 2) * 1.0 / 16.0 ..
       (System.Max_Int / 2) * 1.0 / 16.0;

     subtype Fixed_Point_Subtype is
       Base_Fixed_Point_Type range -50.0 .. 50.0;

     type New_Fixed_Point_Type is
       new Base_Fixed_Point_Type range -50.0 .. 50.0;

     Base_Object            : Base_Fixed_Point_Type := -50.0;
     Subtype_Object         : Fixed_Point_Subtype := -50.0;
     New_Type_Object        : New_Fixed_Point_Type := -50.0;
begin
   Base_Object := 1.0/16.0; -- BREAK
   Subtype_Object := 1.0/16.0;
end Test_Case;

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2020-12-02 15:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01 11:22 [Bug default/26987] New: " mliska at suse dot cz
2020-12-01 11:38 ` [Bug default/26987] " jakub at redhat dot com
2020-12-02  8:25 ` mliska at suse dot cz
2020-12-02 10:06 ` mark at klomp dot org
2020-12-02 10:27 ` mliska at suse dot cz
2020-12-02 10:56 ` mark at klomp dot org
2020-12-02 12:29 ` mliska at suse dot cz
2020-12-02 12:31 ` mliska at suse dot cz
2020-12-02 12:51 ` mark at klomp dot org
2020-12-02 13:09 ` mark at klomp dot org
2020-12-02 14:19 ` tromey at sourceware dot org
2020-12-02 14:26 ` jakub at redhat dot com
2020-12-02 14:35 ` mark at klomp dot org
2020-12-02 14:40 ` jakub at redhat dot com
2020-12-02 15:08 ` jakub at redhat dot com
2020-12-02 15:14 ` mark at klomp dot org
2020-12-02 15:17 ` mark at klomp dot org
2020-12-02 15:18 ` jakub at redhat dot com
2020-12-02 15:21 ` jakub at redhat dot com
2020-12-02 15:27 ` mark at klomp dot org
2020-12-02 15:35 ` tromey at sourceware dot org [this message]
2020-12-02 16:05 ` ebotcazou at gcc dot gnu.org
2020-12-02 23:46 ` jakub at redhat dot com
2021-02-13 22:52 ` mark at klomp dot org
2021-02-18 21:19 ` mark at klomp dot 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-26987-11298-tYFJfflKCT@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=dwz@sourceware.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).