aboutsummaryrefslogtreecommitdiffstats
path: root/src/grt/grt-lib.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-04-25 04:09:37 +0200
committerTristan Gingold <tgingold@free.fr>2018-04-25 04:27:09 +0200
commitb6d79c2362746b35bf276a610afaa7b9218bf183 (patch)
tree402466cb571f6e44886bba1e9c2ed9e92e87fc5c /src/grt/grt-lib.adb
parent9adcbde96c2f848c6323b1468b04d28de1976c33 (diff)
downloadghdl-b6d79c2362746b35bf276a610afaa7b9218bf183.tar.gz
ghdl-b6d79c2362746b35bf276a610afaa7b9218bf183.tar.bz2
ghdl-b6d79c2362746b35bf276a610afaa7b9218bf183.zip
Use specific error message for direction mismatch.
Fix #559
Diffstat (limited to 'src/grt/grt-lib.adb')
-rw-r--r--src/grt/grt-lib.adb19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/grt/grt-lib.adb b/src/grt/grt-lib.adb
index 9aa3558cc..c05e97ba3 100644
--- a/src/grt/grt-lib.adb
+++ b/src/grt/grt-lib.adb
@@ -164,8 +164,8 @@ package body Grt.Lib is
Error_E ("");
end Ghdl_Program_Error;
- procedure Ghdl_Bound_Check_Failed_L1 (Filename : Ghdl_C_String;
- Line: Ghdl_I32)
+ procedure Ghdl_Bound_Check_Failed (Filename : Ghdl_C_String;
+ Line: Ghdl_I32)
is
Bt : Backtrace_Addrs;
begin
@@ -175,7 +175,20 @@ package body Grt.Lib is
Error_C (":");
Error_C (Integer (Line));
Error_E_Call_Stack (Bt);
- end Ghdl_Bound_Check_Failed_L1;
+ end Ghdl_Bound_Check_Failed;
+
+ procedure Ghdl_Direction_Check_Failed (Filename : Ghdl_C_String;
+ Line: Ghdl_I32)
+ is
+ Bt : Backtrace_Addrs;
+ begin
+ Save_Backtrace (Bt, 1);
+ Error_C ("slice direction doesn't match index direction at ");
+ Error_C (Filename);
+ Error_C (":");
+ Error_C (Integer (Line));
+ Error_E_Call_Stack (Bt);
+ end Ghdl_Direction_Check_Failed;
function Ghdl_Integer_Exp (V : Ghdl_I32; E : Ghdl_I32)
return Ghdl_I32