aboutsummaryrefslogtreecommitdiffstats
path: root/src/psl/psl-nodes.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-05-29 18:47:14 +0200
committerTristan Gingold <tgingold@free.fr>2020-05-29 18:56:32 +0200
commit26a94c92410720f9ad3cdb2f163f3b8cca3a326d (patch)
treeb70c62f9e5c99762a4590fa77189985bc86c5b9c /src/psl/psl-nodes.adb
parent0a51563e4e5989abe8becd1c060e06d4dec6024e (diff)
downloadghdl-26a94c92410720f9ad3cdb2f163f3b8cca3a326d.tar.gz
ghdl-26a94c92410720f9ad3cdb2f163f3b8cca3a326d.tar.bz2
ghdl-26a94c92410720f9ad3cdb2f163f3b8cca3a326d.zip
psl-nodes: set a location on false/true/one/EOS nodes. Fix #1345
Diffstat (limited to 'src/psl/psl-nodes.adb')
-rw-r--r--src/psl/psl-nodes.adb11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/psl/psl-nodes.adb b/src/psl/psl-nodes.adb
index 3b3dac4be..d3a0d9320 100644
--- a/src/psl/psl-nodes.adb
+++ b/src/psl/psl-nodes.adb
@@ -304,23 +304,32 @@ package body PSL.Nodes is
Errors.Error_Kind (Msg, N);
end Failed;
- procedure Init is
+ procedure Init (Loc : Location_Type) is
begin
+ pragma Assert (Loc /= No_Location);
Nodet.Init;
+
if Create_Node (N_False) /= False_Node then
raise Internal_Error;
end if;
+ Set_Location (False_Node, Loc);
+
if Create_Node (N_True) /= True_Node then
raise Internal_Error;
end if;
+ Set_Location (True_Node, Loc);
+
if Create_Node (N_Number) /= One_Node then
raise Internal_Error;
end if;
Set_Value (One_Node, 1);
+ Set_Location (One_Node, Loc);
+
if Create_Node (N_EOS) /= EOS_Node then
raise Internal_Error;
end if;
Set_Hash (EOS_Node, 0);
+ Set_Location (EOS_Node, Loc);
PSL.Hash.Init;
end Init;