aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch5.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch5.adb')
-rw-r--r--gcc/ada/sem_ch5.adb17
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 7c33e38..64c5dc7 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -580,17 +580,16 @@ package body Sem_Ch5 is
Set_Assignment_Type (Lhs, T1);
- -- If the target of the assignment is an entity of a mutable type
- -- and the expression is a conditional expression, its alternatives
- -- can be of different subtypes of the nominal type of the LHS, so
- -- they must be resolved with the base type, given that their subtype
- -- may differ frok that of the target mutable object.
+ -- If the target of the assignment is an entity of a mutable type and
+ -- the expression is a conditional expression, its alternatives can be
+ -- of different subtypes of the nominal type of the LHS, so they must be
+ -- resolved with the base type, given that their subtype may differ from
+ -- that of the target mutable object.
if Is_Entity_Name (Lhs)
- and then Ekind_In (Entity (Lhs),
- E_Variable,
- E_Out_Parameter,
- E_In_Out_Parameter)
+ and then Ekind_In (Entity (Lhs), E_In_Out_Parameter,
+ E_Out_Parameter,
+ E_Variable)
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)