From 26a94c92410720f9ad3cdb2f163f3b8cca3a326d Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 29 May 2020 18:47:14 +0200 Subject: psl-nodes: set a location on false/true/one/EOS nodes. Fix #1345 --- src/psl/psl-nodes.adb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/psl/psl-nodes.adb') 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; -- cgit v1.2.3