diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-11-30 21:02:11 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-12-01 12:41:52 +0100 |
commit | 88f555c1bb9cb2775164a9bacba670d10f6ed337 (patch) | |
tree | 2cee90edc9abeda7c727c81f5974065b3adb6398 | |
parent | 8b2278144ed90af6e5ce99401ea8af51e0b0deff (diff) | |
download | ghdl-88f555c1bb9cb2775164a9bacba670d10f6ed337.tar.gz ghdl-88f555c1bb9cb2775164a9bacba670d10f6ed337.tar.bz2 ghdl-88f555c1bb9cb2775164a9bacba670d10f6ed337.zip |
psl: avoid a crash when PSL is used as vhdl expression.
-rw-r--r-- | src/vhdl/parse_psl.adb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vhdl/parse_psl.adb b/src/vhdl/parse_psl.adb index c9d5f38f1..4a7a7bc34 100644 --- a/src/vhdl/parse_psl.adb +++ b/src/vhdl/parse_psl.adb @@ -71,7 +71,12 @@ package body Parse_Psl is Free_Node (N); return Res; when others => - Error_Kind ("psl_to_vhdl", N); + Error_Msg_Parse + (+N, "PSL construct not allowed as VHDL expression"); + Res := Create_Iir (Iir_Kind_Error); + Set_Location (Res, Get_Location (N)); + Free_Node (N); + return Res; end case; end Psl_To_Vhdl; |