diff options
| author | Tom Tromey <tromey@adacore.com> | 2026-02-11 15:05:26 -0700 |
|---|---|---|
| committer | Tom Tromey <tromey@adacore.com> | 2026-02-12 14:34:24 -0700 |
| commit | af67bb32a24bf26287568ce5069d8e12be6579ec (patch) | |
| tree | c57c475080e9bf3ab0b1f627ff80c9204321df02 /elfcpp | |
| parent | 4f13feb6044200ee2d195a5f2bdb194535e1f28b (diff) | |
| download | binutils-af67bb32a24bf26287568ce5069d8e12be6579ec.tar.gz binutils-af67bb32a24bf26287568ce5069d8e12be6579ec.tar.bz2 binutils-af67bb32a24bf26287568ce5069d8e12be6579ec.zip | |
Handle enumerators in name associations in Ada
assoc.exp does this:
print pck.value := (Left => 3, Center => 7, Pck.Right => 2)
However, the test case is constructed so that "Center" has multiple
meanings: it might name the enumerator here:
type Posn is (Left, Center, Right);
or it might refer to this variable:
Center : Pck.Posn := Pck.Right;
The correct answer in this case is to pick the enumerator, because
that is the array's index type.
Originally I didn't fix this problem and instead used a kfail.
However, this same problem turned up again (in a slightly different
form) when the libgnat debuginfo was installed.
This patch fixes the bug by introducing new code in
ada_name_association::assign to handle the enumeration case.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33896
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33898
Tested-By: Tom de Vries <tdevries@suse.de>
Diffstat (limited to 'elfcpp')
0 files changed, 0 insertions, 0 deletions
