From 62226c35545bcda44ae97630658d1ad8129ab0c6 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Sun, 10 May 2020 16:16:30 +0200 Subject: [PATCH] [Ada] Minor cleanup with Is_Assignable gcc/ada/ * sem_ch5.adb (Analyze_Assignment): Reuse Is_Assignable. --- gcc/ada/sem_ch5.adb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb index 8cce5dfe296..4028d0232ab 100644 --- a/gcc/ada/sem_ch5.adb +++ b/gcc/ada/sem_ch5.adb @@ -822,9 +822,7 @@ package body Sem_Ch5 is -- that of the target mutable object. if Is_Entity_Name (Lhs) - and then Ekind_In (Entity (Lhs), E_In_Out_Parameter, - E_Out_Parameter, - E_Variable) + and then Is_Assignable (Entity (Lhs)) and then Is_Composite_Type (T1) and then not Is_Constrained (Etype (Entity (Lhs))) and then Nkind_In (Rhs, N_If_Expression, N_Case_Expression) -- 2.30.2