diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-12-19 18:13:33 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-12-21 07:36:47 +0100 |
commit | 32d6bd2439f8a4fc054beec320cf03b7e89f9de1 (patch) | |
tree | 4b8d7dc76f2e5bba25a1d769c5c9e79025edf670 /src/vhdl | |
parent | ae571344c5b6fe65c5a469251afeeee3d8f315b2 (diff) | |
download | ghdl-32d6bd2439f8a4fc054beec320cf03b7e89f9de1.tar.gz ghdl-32d6bd2439f8a4fc054beec320cf03b7e89f9de1.tar.bz2 ghdl-32d6bd2439f8a4fc054beec320cf03b7e89f9de1.zip |
sem_types: always set element position on record element constraint.
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/sem_types.adb | 4 |
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); |