diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-10-22 20:33:28 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-10-22 20:33:28 +0200 |
commit | 2f6c68a64c2e0567fe8cb3cbf75d6c1079e1d267 (patch) | |
tree | 8dab53efb0929e73ed1fd8471d07fc07db483d0a /src/vhdl | |
parent | 54c8c456d24135704317d1bbe769697e10275da6 (diff) | |
download | ghdl-2f6c68a64c2e0567fe8cb3cbf75d6c1079e1d267.tar.gz ghdl-2f6c68a64c2e0567fe8cb3cbf75d6c1079e1d267.tar.bz2 ghdl-2f6c68a64c2e0567fe8cb3cbf75d6c1079e1d267.zip |
translate: handle unbounded record in individual assocs.
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/sem_assocs.adb | 3 | ||||
-rw-r--r-- | src/vhdl/translate/trans-chap4.adb | 6 | ||||
-rw-r--r-- | src/vhdl/translate/trans-chap6.adb | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/vhdl/sem_assocs.adb b/src/vhdl/sem_assocs.adb index c06ce6f98..88595921e 100644 --- a/src/vhdl/sem_assocs.adb +++ b/src/vhdl/sem_assocs.adb @@ -1066,7 +1066,8 @@ package body Sem_Assocs is end if; end Finish_Individual_Assoc_Record; - -- Free recursively all the choices of ASSOC. + -- Free recursively all the choices of ASSOC. Once the type is computed + -- this is not needed anymore. procedure Clean_Individual_Association (Assoc : Iir) is El, N_El : Iir; diff --git a/src/vhdl/translate/trans-chap4.adb b/src/vhdl/translate/trans-chap4.adb index 1e7ad5fea..ed96d8723 100644 --- a/src/vhdl/translate/trans-chap4.adb +++ b/src/vhdl/translate/trans-chap4.adb @@ -65,7 +65,7 @@ package body Trans.Chap4 is function Get_Object_Ptr_Type (Tinfo : Type_Info_Acc; Kind : Object_Kind_Type) return O_Tnode is begin - if Tinfo.Type_Mode = Type_Mode_Fat_Array then + if Tinfo.Type_Mode in Type_Mode_Unbounded then -- Fat pointers are already pointers, no need to create an -- additional indirection. return Tinfo.Ortho_Type (Kind); @@ -87,7 +87,7 @@ package body Trans.Chap4 is begin if (Mode = Mode_Signal and then Tinfo.Type_Mode in Type_Mode_Scalar) - or else Tinfo.Type_Mode = Type_Mode_Fat_Array + or else Tinfo.Type_Mode in Type_Mode_Unbounded then return Lv2M (Obj_Ptr, Tinfo, Mode); else @@ -102,7 +102,7 @@ package body Trans.Chap4 is begin pragma Assert (Mode = Get_Object_Kind (Src)); pragma Assert (Tinfo.Type_Mode = Get_Type_Info (Src).Type_Mode); - if Tinfo.Type_Mode = Type_Mode_Fat_Array then + if Tinfo.Type_Mode in Type_Mode_Unbounded then Copy_Fat_Pointer (Stabilize (Dest), Stabilize (Src)); else if Mode = Mode_Signal diff --git a/src/vhdl/translate/trans-chap6.adb b/src/vhdl/translate/trans-chap6.adb index e0bb4b2d6..3c2b55cf1 100644 --- a/src/vhdl/translate/trans-chap6.adb +++ b/src/vhdl/translate/trans-chap6.adb @@ -750,7 +750,7 @@ package body Trans.Chap6 is return Get_Var (Info.Signal_Sig, Type_Info, Mode_Signal); else pragma Assert (Info.Signal_Valp /= Null_Var); - if Type_Info.Type_Mode = Type_Mode_Fat_Array then + if Type_Info.Type_Mode in Type_Mode_Unbounded then return Get_Var (Info.Signal_Valp, Type_Info, Mode_Value); else return Get_Varp (Info.Signal_Valp, Type_Info, Mode_Value); |