aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-09-06 05:31:29 +0200
committerTristan Gingold <tgingold@free.fr>2017-09-06 05:31:29 +0200
commit9ed2199d83ebf4beaca2d6381c9f552165b8ba5f (patch)
treef82c0cb215f972172419cdf4bf410537a317fb89
parent69e6e7e0040509b28f2ecaad754ee4bec93e53e5 (diff)
downloadghdl-9ed2199d83ebf4beaca2d6381c9f552165b8ba5f.tar.gz
ghdl-9ed2199d83ebf4beaca2d6381c9f552165b8ba5f.tar.bz2
ghdl-9ed2199d83ebf4beaca2d6381c9f552165b8ba5f.zip
Also fix crash for assert statement
For #407
-rw-r--r--src/vhdl/canon.adb4
-rw-r--r--testsuite/gna/issue407/test1.vhdl12
-rwxr-xr-xtestsuite/gna/issue407/testsuite.sh3
3 files changed, 17 insertions, 2 deletions
diff --git a/src/vhdl/canon.adb b/src/vhdl/canon.adb
index d2c3cc8c3..39f83e712 100644
--- a/src/vhdl/canon.adb
+++ b/src/vhdl/canon.adb
@@ -360,9 +360,9 @@ package body Canon is
-- resulting sets.
Canon_Extract_Sensitivity
(Get_Assertion_Condition (Stmt), List);
- Canon_Extract_Sensitivity
+ Canon_Extract_Sensitivity_If_Not_Null
(Get_Severity_Expression (Stmt), List);
- Canon_Extract_Sensitivity
+ Canon_Extract_Sensitivity_If_Not_Null
(Get_Report_Expression (Stmt), List);
when Iir_Kind_Report_Statement =>
-- LRM08 11.3
diff --git a/testsuite/gna/issue407/test1.vhdl b/testsuite/gna/issue407/test1.vhdl
new file mode 100644
index 000000000..6893d4405
--- /dev/null
+++ b/testsuite/gna/issue407/test1.vhdl
@@ -0,0 +1,12 @@
+entity test1 is
+begin
+end entity;
+
+architecture arch of test1 is
+begin
+ process(all)
+ begin
+ assert false report "compilation crashes here";
+ assert false;
+ end process;
+end architecture;
diff --git a/testsuite/gna/issue407/testsuite.sh b/testsuite/gna/issue407/testsuite.sh
index 1d84c0f57..61e8efa0b 100755
--- a/testsuite/gna/issue407/testsuite.sh
+++ b/testsuite/gna/issue407/testsuite.sh
@@ -6,6 +6,9 @@ export GHDL_STD_FLAGS=--std=08
analyze test.vhdl
elab_simulate test
+analyze test1.vhdl
+elab_simulate test1
+
clean
echo "Test successful"