Fix Ada assignment resolution
authorTom Tromey <tromey@adacore.com>
Mon, 15 Mar 2021 12:23:12 +0000 (06:23 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 15 Mar 2021 12:23:12 +0000 (06:23 -0600)
commit1ac7452264fee536b0f62610e8dbe9f9e253a6f8
treec300360bc3df87f909e9c5148e7bf41999406a52
parent207582c0758738447d2df8f778aeebf126c73b31
Fix Ada assignment resolution

The expression rewrite missed an Ada resolution case.  GDB previously
knew how to disambiguate the right hand side of an assignment, but now
it does not.

This patch fixes the problem and adds the missing test case.

gdb/ChangeLog
2021-03-15  Tom Tromey  <tromey@adacore.com>

* ada-exp.y (exp1): Handle resolution of the right hand side of an
assignment.

gdb/testsuite/ChangeLog
2021-03-15  Tom Tromey  <tromey@adacore.com>

* gdb.ada/enums_overload/enums_overload_main.adb: New file.
* gdb.ada/enums_overload/enums_overload.ads: New file.
* gdb.ada/enums_overload/enums_overload.adb: New file.
* gdb.ada/enums_overload.exp: New file.
gdb/ChangeLog
gdb/ada-exp.y
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/enums_overload.exp [new file with mode: 0644]
gdb/testsuite/gdb.ada/enums_overload/enums_overload.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/enums_overload/enums_overload.ads [new file with mode: 0644]
gdb/testsuite/gdb.ada/enums_overload/enums_overload_main.adb [new file with mode: 0644]