From 31e358e1c8a0f896ec189b1fdb28dcb4a21a1e78 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 2 May 2017 10:28:03 +0200 Subject: [multiple changes] 2017-05-02 Hristian Kirtchev * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting. 2017-05-02 Bob Duff * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op to find primitive ops, instead of using an Identifier that will later be looked up. This is necessary because these ops are not necessarily visible at all places where we need to call them. * exp_util.ads: Minor comment fix. From-SVN: r247466 --- gcc/ada/sem_ch6.adb | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'gcc/ada/sem_ch6.adb') diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 98c893b..5c31c42 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -8763,18 +8763,20 @@ package body Sem_Ch6 is if Present (Entity (E1)) then return Entity (E1) = Entity (E2) - -- One may be a discriminant that has been replaced by - -- the corresponding discriminal. + -- One may be a discriminant that has been replaced by the + -- corresponding discriminal. - or else (Chars (Entity (E1)) = Chars (Entity (E2)) - and then Ekind (Entity (E1)) = E_Discriminant - and then Ekind (Entity (E2)) = E_In_Parameter) + or else + (Chars (Entity (E1)) = Chars (Entity (E2)) + and then Ekind (Entity (E1)) = E_Discriminant + and then Ekind (Entity (E2)) = E_In_Parameter) -- The discriminant of a protected type is transformed into -- a local constant and then into a parameter of a protected -- operation. - or else (Ekind (Entity (E1)) = E_Constant + or else + (Ekind (Entity (E1)) = E_Constant and then Ekind (Entity (E2)) = E_In_Parameter and then Present (Discriminal_Link (Entity (E1))) and then Discriminal_Link (Entity (E1)) = @@ -8784,9 +8786,10 @@ package body Sem_Ch6 is -- match if they have the same identifier, even though they -- are different entities. - or else (Chars (Entity (E1)) = Chars (Entity (E2)) - and then Ekind (Entity (E1)) = E_Loop_Parameter - and then Ekind (Entity (E2)) = E_Loop_Parameter); + or else + (Chars (Entity (E1)) = Chars (Entity (E2)) + and then Ekind (Entity (E1)) = E_Loop_Parameter + and then Ekind (Entity (E2)) = E_Loop_Parameter); elsif Nkind (E1) = N_Expanded_Name and then Nkind (E2) = N_Expanded_Name -- cgit v1.1