[Ada] Minor reuse Is_Assignable
authorPiotr Trojanek <trojanek@adacore.com>
Sun, 15 Nov 2020 11:03:30 +0000 (12:03 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 30 Nov 2020 14:16:21 +0000 (09:16 -0500)
gcc/ada/

* sem_ch5.adb (Process_Statements): Replace low-level membership
test with a high-level wrapper.

gcc/ada/sem_ch5.adb

index 52150df5e69ee357afb94b406a528e161c9aef9a..b13635691d5c968ad998aab88255f4fdcc35e5f7 100644 (file)
@@ -1466,8 +1466,7 @@ package body Sem_Ch5 is
          if Is_Entity_Name (Exp) then
             Ent := Entity (Exp);
 
-            if Ekind (Ent) in E_Variable | E_In_Out_Parameter | E_Out_Parameter
-            then
+            if Is_Assignable (Ent) then
                if List_Length (Choices) = 1
                  and then Nkind (First (Choices)) in N_Subexpr
                  and then Compile_Time_Known_Value (First (Choices))