aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/sem_expr.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-11-21 07:46:00 +0100
committerTristan Gingold <tgingold@free.fr>2018-11-21 07:46:00 +0100
commitd22e878995eedc2efa45bbda640a5e984f03e224 (patch)
tree6af43a928e241fe6d82481063e534909265eb06a /src/vhdl/sem_expr.adb
parent2971a32a22eb1364413a0df241d56beb748c3e99 (diff)
downloadghdl-d22e878995eedc2efa45bbda640a5e984f03e224.tar.gz
ghdl-d22e878995eedc2efa45bbda640a5e984f03e224.tar.bz2
ghdl-d22e878995eedc2efa45bbda640a5e984f03e224.zip
aggregates: WIP for arrays of unbounded elements.
Fix #546
Diffstat (limited to 'src/vhdl/sem_expr.adb')
-rw-r--r--src/vhdl/sem_expr.adb3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vhdl/sem_expr.adb b/src/vhdl/sem_expr.adb
index 671d45ed5..51d74796c 100644
--- a/src/vhdl/sem_expr.adb
+++ b/src/vhdl/sem_expr.adb
@@ -3772,6 +3772,8 @@ package body Sem_Expr is
-- and statically match the subtype of the aggregate.
if Aggr_Constrained then
A_Subtype := Create_Array_Subtype (Base_Type, Get_Location (Aggr));
+ -- FIXME: extract element subtype ?
+ Set_Element_Subtype (A_Subtype, Get_Element_Subtype (Aggr_Type));
Type_Staticness := Get_Type_Staticness (A_Subtype);
for I in Infos'Range loop
Set_Nth_Element (Get_Index_Subtype_List (A_Subtype), I - 1,
@@ -3781,6 +3783,7 @@ package body Sem_Expr is
end loop;
Set_Type_Staticness (A_Subtype, Type_Staticness);
Set_Index_Constraint_Flag (A_Subtype, True);
+ -- FIXME: the element can be unconstrained.
Set_Constraint_State (A_Subtype, Fully_Constrained);
Set_Type (Aggr, A_Subtype);
Set_Literal_Subtype (Aggr, A_Subtype);