From 4bcf29692fd5ee57cc857157912e9ef492205075 Mon Sep 17 00:00:00 2001 From: Ed Schonberg Date: Thu, 12 Dec 2019 10:03:11 +0000 Subject: [PATCH] [Ada] Fix processing of standard predefined operators 2019-12-12 Ed Schonberg gcc/ada/ * sem_res.adb: Fix processing of standard predefined operators. From-SVN: r279296 --- gcc/ada/ChangeLog | 4 ++++ gcc/ada/sem_res.adb | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 52cb1791ad9..49fdae76d96 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2019-12-12 Ed Schonberg + + * sem_res.adb: Fix processing of standard predefined operators. + 2019-12-12 Piotr Trojanek * libgnarl/a-dispat.ads (Yield): Update Global contract. diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 4a50b0982ea..560f0f0a3f4 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); -- 2.30.2