aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2020-11-15 12:03:30 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2020-11-30 09:16:21 -0500
commit1c4dfafe6837c93861581f12edb0b422be407493 (patch)
tree106e28326dc89e1e09e7768f5169b64d0b9b9c28 /gcc
parentad6be99f1ac24607e9c49cdbc9c300d76007f0b6 (diff)
downloadgcc-1c4dfafe6837c93861581f12edb0b422be407493.zip
gcc-1c4dfafe6837c93861581f12edb0b422be407493.tar.gz
gcc-1c4dfafe6837c93861581f12edb0b422be407493.tar.bz2
[Ada] Minor reuse Is_Assignable
gcc/ada/ * sem_ch5.adb (Process_Statements): Replace low-level membership test with a high-level wrapper.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_ch5.adb3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 52150df..b136356 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -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))