aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-07-15 18:47:09 +0200
committerTristan Gingold <tgingold@free.fr>2019-07-15 18:47:09 +0200
commitf0e5c6ed7f858c2975f8a2a1e611bc063b236f62 (patch)
tree27edbaaad762754253613a3fb6b3fd9b271886e9
parent7036050236ca310be95d7b727fa6ac5cb7c9392c (diff)
downloadghdl-f0e5c6ed7f858c2975f8a2a1e611bc063b236f62.tar.gz
ghdl-f0e5c6ed7f858c2975f8a2a1e611bc063b236f62.tar.bz2
ghdl-f0e5c6ed7f858c2975f8a2a1e611bc063b236f62.zip
vhdl: avoid a crash on no matching operator error.
Fix #869
-rw-r--r--src/vhdl/vhdl-sem_expr.adb8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-sem_expr.adb b/src/vhdl/vhdl-sem_expr.adb
index e434ce0c1..59159feff 100644
--- a/src/vhdl/vhdl-sem_expr.adb
+++ b/src/vhdl/vhdl-sem_expr.adb
@@ -1973,7 +1973,13 @@ package body Vhdl.Sem_Expr is
Free_Iir (Overload);
Overload := Get_Type (Expr);
Free_Overload_List (Overload);
- return Set_Uniq_Interpretation (Full_Compat);
+ if Full_Compat = Null_Iir then
+ Error_Msg_Sem (+Expr,
+ "no matching function declarations for %n", +Expr);
+ return Null_Iir;
+ else
+ return Set_Uniq_Interpretation (Full_Compat);
+ end if;
end if;
end Sem_Operator;