diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-10-24 20:40:35 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-10-24 20:40:35 +0200 |
commit | 47a0b02c8c9175389d0ac0a44ef1b9a9a6521503 (patch) | |
tree | 0abac168243f2cf227c3792151f87a5c1f6111ea | |
parent | 278677dd1bb3c9fa2b7f9950d13afaf04ef4059b (diff) | |
download | ghdl-47a0b02c8c9175389d0ac0a44ef1b9a9a6521503.tar.gz ghdl-47a0b02c8c9175389d0ac0a44ef1b9a9a6521503.tar.bz2 ghdl-47a0b02c8c9175389d0ac0a44ef1b9a9a6521503.zip |
trans-chap9: add a guard.
Fix #663
-rw-r--r-- | src/vhdl/canon.adb | 5 | ||||
-rw-r--r-- | src/vhdl/translate/trans-chap9.adb | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/vhdl/canon.adb b/src/vhdl/canon.adb index 5d7755faf..bf6e7562a 100644 --- a/src/vhdl/canon.adb +++ b/src/vhdl/canon.adb @@ -258,8 +258,9 @@ package body Canon is end; when Iir_Kind_Object_Alias_Declaration => - Canon_Extract_Sensitivity - (Get_Name (Expr), Sensitivity_List, Is_Target); + if not Is_Target and then Is_Signal_Object (Expr) then + Add_Element (Sensitivity_List, Expr); + end if; when Iir_Kind_Constant_Declaration | Iir_Kind_Interface_Constant_Declaration diff --git a/src/vhdl/translate/trans-chap9.adb b/src/vhdl/translate/trans-chap9.adb index 00295f738..3213e50a0 100644 --- a/src/vhdl/translate/trans-chap9.adb +++ b/src/vhdl/translate/trans-chap9.adb @@ -1257,6 +1257,15 @@ package body Trans.Chap9 is Fields : constant Fields_Array := Get_Fields (Kind); F : Fields_Enum; begin + case Kind is + when Iir_Kind_Object_Alias_Declaration => + -- No types to free, don't try to recurse as the name can be + -- a slice (which will then be freed). + return; + when others => + null; + end case; + for I in Fields'Range loop F := Fields (I); case F is |