aboutsummaryrefslogtreecommitdiffstats
path: root/sem_stmts.adb
diff options
context:
space:
mode:
authorgingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7>2006-11-18 20:33:16 +0000
committergingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7>2006-11-18 20:33:16 +0000
commit301584eaf540c982676f520d662b473e59890584 (patch)
tree3c8a80a0b57610fcb0e12a4f8985764fae538aa7 /sem_stmts.adb
parentb9d724056d765418acf57c2fa7a79b7ef7e73721 (diff)
downloadghdl-301584eaf540c982676f520d662b473e59890584.tar.gz
ghdl-301584eaf540c982676f520d662b473e59890584.tar.bz2
ghdl-301584eaf540c982676f520d662b473e59890584.zip
SEH handled
Bug fixes
Diffstat (limited to 'sem_stmts.adb')
-rw-r--r--sem_stmts.adb21
1 files changed, 13 insertions, 8 deletions
diff --git a/sem_stmts.adb b/sem_stmts.adb
index 0bda7f117..555bfbf39 100644
--- a/sem_stmts.adb
+++ b/sem_stmts.adb
@@ -351,7 +351,8 @@ package body Sem_Stmts is
Error_Msg_Sem ("implicit GUARD signal cannot be assigned", Stmt);
return;
when others =>
- Error_Msg_Sem ("target is not a signal", Stmt);
+ Error_Msg_Sem ("target (" & Disp_Node (Get_Base_Name (Target))
+ & ") is not a signal", Stmt);
return;
end case;
if Get_Name_Staticness (Target_Object) < Staticness then
@@ -461,14 +462,18 @@ package body Sem_Stmts is
begin
Ok := True;
-- Find the signal.
- Target := Get_Target (Stmt);
- Target := Sem_Expression (Target, Sig_Type);
- if Target /= Null_Iir then
- Set_Target (Stmt, Target);
- Check_Target (Stmt, Target);
- Sem_Types.Set_Type_Has_Signal (Get_Type (Target));
- else
+ if Sig_Type = Null_Iir then
Ok := False;
+ else
+ Target := Get_Target (Stmt);
+ Target := Sem_Expression (Target, Sig_Type);
+ if Target /= Null_Iir then
+ Set_Target (Stmt, Target);
+ Check_Target (Stmt, Target);
+ Sem_Types.Set_Type_Has_Signal (Get_Type (Target));
+ else
+ Ok := False;
+ end if;
end if;
Expr := Get_Reject_Time_Expression (Stmt);