projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db290a9
)
[Ada] Minor cleanup with Is_Assignable
author
Piotr Trojanek
<trojanek@adacore.com>
Sun, 10 May 2020 14:16:30 +0000
(16:16 +0200)
committer
Pierre-Marie de Rodat
<derodat@adacore.com>
Tue, 7 Jul 2020 09:26:53 +0000
(
05:26
-0400)
gcc/ada/
* sem_ch5.adb (Analyze_Assignment): Reuse Is_Assignable.
gcc/ada/sem_ch5.adb
patch
|
blob
|
history
diff --git
a/gcc/ada/sem_ch5.adb
b/gcc/ada/sem_ch5.adb
index 8cce5dfe296a6ac06cfad68b93443eabf82619b9..4028d0232ab9b29fb19c8c1c7ef32cf6a4bb5504 100644
(file)
--- 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)