aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-12-19 18:13:33 +0100
committerTristan Gingold <tgingold@free.fr>2017-12-21 07:36:47 +0100
commit32d6bd2439f8a4fc054beec320cf03b7e89f9de1 (patch)
tree4b8d7dc76f2e5bba25a1d769c5c9e79025edf670 /src
parentae571344c5b6fe65c5a469251afeeee3d8f315b2 (diff)
downloadghdl-32d6bd2439f8a4fc054beec320cf03b7e89f9de1.tar.gz
ghdl-32d6bd2439f8a4fc054beec320cf03b7e89f9de1.tar.bz2
ghdl-32d6bd2439f8a4fc054beec320cf03b7e89f9de1.zip
sem_types: always set element position on record element constraint.
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/sem_types.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vhdl/sem_types.adb b/src/vhdl/sem_types.adb
index 471ec9864..cef868bcc 100644
--- a/src/vhdl/sem_types.adb
+++ b/src/vhdl/sem_types.adb
@@ -2011,16 +2011,18 @@ package body Sem_Types is
Set_Element_Declaration (El, Tm_El);
Set_Base_Element_Declaration
(El, Get_Base_Element_Declaration (Tm_El));
- Set_Element_Position (El, Get_Element_Position (Tm_El));
El_Type := Null_Iir;
else
El := Els (I);
El_Type := Get_Type (El);
+ pragma Assert
+ (Get_Kind (El) = Iir_Kind_Record_Element_Constraint);
end if;
El_Type := Sem_Subtype_Constraint (El_Type,
Get_Type (Tm_El),
Res_Els (I));
Set_Type (El, El_Type);
+ Set_Element_Position (El, Get_Element_Position (Tm_El));
end if;
Set_Nth_Element (El_List, I, El);
Constraint := Update_Record_Constraint (Constraint, El_Type);