diff options
| author | Tristan Gingold <tgingold@free.fr> | 2020-03-06 20:35:07 +0100 | 
|---|---|---|
| committer | Tristan Gingold <tgingold@free.fr> | 2020-03-06 20:35:15 +0100 | 
| commit | a03907b584362b4b6a935781c0bd79fb63c21696 (patch) | |
| tree | 3a6d98bcc9279f9ec46d13d898ec88d495c29179 | |
| parent | 3418818682c5612fbb02641754dd78479f39d58c (diff) | |
| download | ghdl-a03907b584362b4b6a935781c0bd79fb63c21696.tar.gz ghdl-a03907b584362b4b6a935781c0bd79fb63c21696.tar.bz2 ghdl-a03907b584362b4b6a935781c0bd79fb63c21696.zip  | |
vhdl-sem_stmts: improve error message for signal assignment.
| -rw-r--r-- | src/vhdl/vhdl-sem_stmts.adb | 9 | 
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-sem_stmts.adb b/src/vhdl/vhdl-sem_stmts.adb index 29845a471..691c532cf 100644 --- a/src/vhdl/vhdl-sem_stmts.adb +++ b/src/vhdl/vhdl-sem_stmts.adb @@ -318,6 +318,15 @@ package body Vhdl.Sem_Stmts is     begin        Target_Object := Name_To_Object (Target);        if Target_Object = Null_Iir then +         if Get_Kind (Target) = Iir_Kind_Simple_Name +           and then Is_Error (Get_Named_Entity (Target)) +         then +            --  Common case: target is not declared.  There was already +            --  an error message for it. +            return; +         end if; + +         --  Uncommon case: target is not an object (could be a component).           Error_Msg_Sem (+Target, "target is not a signal name");           return;        end if;  | 
