aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-sem_stmts.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-12-30 16:06:01 +0100
committerTristan Gingold <tgingold@free.fr>2019-12-30 16:06:01 +0100
commita79870e0fef0b94e7064c60b4672f74cddc15e95 (patch)
tree82471198a30800510d2220313ada4e81d97ca8fe /src/vhdl/vhdl-sem_stmts.adb
parent6f2290abd601ab96ab934a8503ed96e8312dd728 (diff)
downloadghdl-a79870e0fef0b94e7064c60b4672f74cddc15e95.tar.gz
ghdl-a79870e0fef0b94e7064c60b4672f74cddc15e95.tar.bz2
ghdl-a79870e0fef0b94e7064c60b4672f74cddc15e95.zip
ams-vhdl: improve error recovery
Diffstat (limited to 'src/vhdl/vhdl-sem_stmts.adb')
-rw-r--r--src/vhdl/vhdl-sem_stmts.adb7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-sem_stmts.adb b/src/vhdl/vhdl-sem_stmts.adb
index e1cb740b6..98e01ccb3 100644
--- a/src/vhdl/vhdl-sem_stmts.adb
+++ b/src/vhdl/vhdl-sem_stmts.adb
@@ -2107,6 +2107,7 @@ package body Vhdl.Sem_Stmts is
procedure Sem_Simple_Simultaneous_Statement (Stmt : Iir)
is
Left, Right : Iir;
+ Left_Type, Right_Type : Iir;
Res_Type : Iir;
begin
Left := Get_Simultaneous_Left (Stmt);
@@ -2120,6 +2121,12 @@ package body Vhdl.Sem_Stmts is
return;
end if;
+ Left_Type := Get_Type (Left);
+ Right_Type := Get_Type (Right);
+ if Left_Type = Null_Iir or else Right_Type = Null_Iir then
+ return;
+ end if;
+
Res_Type := Search_Compatible_Type (Get_Type (Left), Get_Type (Right));
if Res_Type = Null_Iir then
Error_Msg_Sem