diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-06-19 20:44:22 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-06-19 20:44:22 +0200 |
commit | 620ddf92b9d72e9dc39e03ea0f6b3b33cf75363f (patch) | |
tree | a44b580eb2c745be5c739f4a0e8be4192b80c6db | |
parent | 7b2da98caf3c389c4bd29df887050414597aeb7f (diff) | |
download | ghdl-620ddf92b9d72e9dc39e03ea0f6b3b33cf75363f.tar.gz ghdl-620ddf92b9d72e9dc39e03ea0f6b3b33cf75363f.tar.bz2 ghdl-620ddf92b9d72e9dc39e03ea0f6b3b33cf75363f.zip |
Translate: use create_temp for create_record_type_builder.
Fix #370
-rw-r--r-- | src/vhdl/translate/trans-chap3.adb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/vhdl/translate/trans-chap3.adb b/src/vhdl/translate/trans-chap3.adb index 4457403ec..b18ca4515 100644 --- a/src/vhdl/translate/trans-chap3.adb +++ b/src/vhdl/translate/trans-chap3.adb @@ -1350,10 +1350,8 @@ package body Trans.Chap3 is and then El_Tinfo.C (Kind).Builder_Need_Func then -- This type needs a builder, call it. - Start_Declare_Stmt; - New_Var_Decl - (Ptr_Var, Get_Identifier ("var_ptr"), - O_Storage_Local, El_Tinfo.Ortho_Ptr_Type (Kind)); + Open_Temp; + Ptr_Var := Create_Temp (El_Tinfo.Ortho_Ptr_Type (Kind)); New_Assign_Stmt (New_Obj (Ptr_Var), @@ -1367,7 +1365,7 @@ package body Trans.Chap3 is Gen_Call_Type_Builder (Dp2M (Ptr_Var, El_Tinfo, Kind), El_Type))); - Finish_Declare_Stmt; + Close_Temp; else if Is_Unbounded_Type (El_Tinfo) then Sub_Bound := Bounds_To_Element_Bounds |