diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-07-03 08:07:07 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-07-18 19:19:54 +0200 |
commit | c231a008f41049bd6b92061b353099002d7bef1e (patch) | |
tree | e29ff32202d4a2f946b4f1277dc6c0f91e54599c /src | |
parent | 99b542c849311c92e87e2c70d283de133c9d4093 (diff) | |
download | ghdl-c231a008f41049bd6b92061b353099002d7bef1e.tar.gz ghdl-c231a008f41049bd6b92061b353099002d7bef1e.tar.bz2 ghdl-c231a008f41049bd6b92061b353099002d7bef1e.zip |
synth-decls: avoid elaboration crash after global signals. For #1387
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/synth-decls.adb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/synth/synth-decls.adb b/src/synth/synth-decls.adb index 7c6f7a107..40c2fe5f2 100644 --- a/src/synth/synth-decls.adb +++ b/src/synth/synth-decls.adb @@ -902,12 +902,14 @@ package body Synth.Decls is Init : Valtyp; Obj_Typ : Type_Acc; begin + Synth_Declaration_Type (Syn_Inst, Decl); if Get_Kind (Get_Parent (Decl)) = Iir_Kind_Package_Declaration then Error_Msg_Synth (+Decl, "signals in packages are not supported"); + -- Avoid elaboration error. + Create_Object (Syn_Inst, Decl, No_Valtyp); return; end if; - Synth_Declaration_Type (Syn_Inst, Decl); Create_Wire_Object (Syn_Inst, Wire_Signal, Decl); if Is_Valid (Def) then Obj_Typ := Get_Subtype_Object (Syn_Inst, Get_Type (Decl)); |