diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-02-01 21:16:12 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-02-02 07:38:18 +0100 |
commit | 421810c715dc3370815f5362ade1b2d1a5632747 (patch) | |
tree | c06a421d35beee07131181d3ba84a8dd50e6736b /src | |
parent | 4a2e4c835179d51d61afef2d58ddc75696eda165 (diff) | |
download | ghdl-421810c715dc3370815f5362ade1b2d1a5632747.tar.gz ghdl-421810c715dc3370815f5362ade1b2d1a5632747.tar.bz2 ghdl-421810c715dc3370815f5362ade1b2d1a5632747.zip |
translate: improve support for Flag_Elaboration
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/translate/trans-chap2.adb | 10 | ||||
-rw-r--r-- | src/vhdl/translate/trans-chap9.adb | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/vhdl/translate/trans-chap2.adb b/src/vhdl/translate/trans-chap2.adb index 27e556609..2aac3e4f3 100644 --- a/src/vhdl/translate/trans-chap2.adb +++ b/src/vhdl/translate/trans-chap2.adb @@ -1011,6 +1011,10 @@ package body Trans.Chap2 is Final : Boolean; Constr : O_Assoc_List; begin + if not Flag_Elaboration and not Is_Nested then + return; + end if; + if not Is_Nested then Start_Subprogram_Body (Info.Package_Elab_Spec_Subprg); Push_Local_Factory; @@ -1044,7 +1048,7 @@ package body Trans.Chap2 is Chap4.Elab_Declaration_Chain (Spec, Final); pragma Unreferenced (Final); - if not Is_Nested then + if not Is_Nested and then Flag_Elaboration then Close_Temp; Subprgs.Finish_Subprg_Instance_Use (Info.Package_Elab_Spec_Instance); @@ -1067,6 +1071,10 @@ package body Trans.Chap2 is return; end if; + if not Flag_Elaboration and not Is_Nested_Package (Spec) then + return; + end if; + if Is_Spec_Decl and then Is_Uninstantiated_Package (Spec) then Set_Scope_Via_Field (Info.Package_Spec_Scope, Info.Package_Spec_Field, diff --git a/src/vhdl/translate/trans-chap9.adb b/src/vhdl/translate/trans-chap9.adb index b1c7205a7..4e5b54023 100644 --- a/src/vhdl/translate/trans-chap9.adb +++ b/src/vhdl/translate/trans-chap9.adb @@ -400,7 +400,7 @@ package body Trans.Chap9 is New_Lit (Ghdl_Index_0)), New_Lit (Std_Boolean_True_Node)); - -- Set flase to the other states. + -- Set false to the other states. New_Assign_Stmt (New_Obj (Var_I), New_Lit (Ghdl_Index_1)); Start_Loop_Stmt (Label); Gen_Exit_When |