diff options
author | Ed Schonberg <schonberg@adacore.com> | 2019-12-12 10:03:11 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-12-12 10:03:11 +0000 |
commit | 4bcf29692fd5ee57cc857157912e9ef492205075 (patch) | |
tree | 8ddb41a19ff265a4c5f2b212341df8961225c09b /gcc | |
parent | ddb677163af059a8b16f53d9f6ebaf7af774f0e3 (diff) | |
download | gcc-4bcf29692fd5ee57cc857157912e9ef492205075.zip gcc-4bcf29692fd5ee57cc857157912e9ef492205075.tar.gz gcc-4bcf29692fd5ee57cc857157912e9ef492205075.tar.bz2 |
[Ada] Fix processing of standard predefined operators
2019-12-12 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* sem_res.adb: Fix processing of standard predefined operators.
From-SVN: r279296
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ada/sem_res.adb | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 52cb179..49fdae7 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2019-12-12 Ed Schonberg <schonberg@adacore.com> + + * sem_res.adb: Fix processing of standard predefined operators. + 2019-12-12 Piotr Trojanek <trojanek@adacore.com> * libgnarl/a-dispat.ads (Yield): Update Global contract. diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 4a50b09..560f0f0 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -8481,12 +8481,16 @@ package body Sem_Res is -- matches that of the formals. For a predefined operqtor, -- it is the scope that matters, given that the predefined -- equality has Any_Type formals. In either case the result - -- type (most often Booleam) must match the context . + -- type (most often Booleam) must match the context .The + -- scope is either that of the type if there is a generated + -- equality (when there is an equality for the component type) + -- or else Standard otherwise. while Present (It.Typ) loop if Etype (It.Nam) = Typ and then (Etype (First_Entity (It.Nam)) = Etype (L) + or else Scope (It.Nam) = Standard_Standard or else Scope (It.Nam) = Scope (T)) then Set_Entity (N, It.Nam); |