diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2022-01-14 00:05:54 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-05-10 08:19:23 +0000 |
commit | 7f8053225de072fed9c4822e589c853a6f5e47c4 (patch) | |
tree | 3cca2df6a508114bb16be38e971920fb4d707482 /gcc/ada/libgnat | |
parent | 6798cad793d9581936f2de76c85a22a5449d7358 (diff) | |
download | gcc-7f8053225de072fed9c4822e589c853a6f5e47c4.zip gcc-7f8053225de072fed9c4822e589c853a6f5e47c4.tar.gz gcc-7f8053225de072fed9c4822e589c853a6f5e47c4.tar.bz2 |
[Ada] Fix hiding of user-defined operator that is not a homograph
This adds a missing test for the presence of a homograph when applying
the RM 8.4(10) clause about the visibility of operators, and removes
resolution code made obsolete by the change. There is also a fixlet
for a previously undetected ambiguity in the runtime.
gcc/ada/
* sem_res.adb (Resolve_Eqyality_Op): Remove obsolete code.
(Resolve_Op_Not): Likewise.
* sem_type.adb (Disambiguate): Add missing test for RM 8.4(10).
* libgnat/s-dwalin.adb (Enable_Cache): Fix ambiguity.
(Symbolic_Address): Likewise.
gcc/testsuite/
* gnat.dg/equal7.adb: Add expected error messages (code is now
illegal).
Diffstat (limited to 'gcc/ada/libgnat')
-rw-r--r-- | gcc/ada/libgnat/s-dwalin.adb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ada/libgnat/s-dwalin.adb b/gcc/ada/libgnat/s-dwalin.adb index 788be41..aff552c 100644 --- a/gcc/ada/libgnat/s-dwalin.adb +++ b/gcc/ada/libgnat/s-dwalin.adb @@ -1544,7 +1544,7 @@ package body System.Dwarf_Lines is exit when Ar_Start = Null_Address and Ar_Len = 0; Len := uint32 (Ar_Len); - Start := uint32 (Ar_Start - C.Low); + Start := uint32 (Address'(Ar_Start - C.Low)); -- Search START in the array @@ -1764,7 +1764,8 @@ package body System.Dwarf_Lines is if C.Cache /= null then declare - Addr_Off : constant uint32 := uint32 (Addr - C.Low); + Addr_Off : constant uint32 := uint32 (Address'(Addr - C.Low)); + First, Last, Mid : Natural; begin First := C.Cache'First; |