From 9ed2199d83ebf4beaca2d6381c9f552165b8ba5f Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 6 Sep 2017 05:31:29 +0200 Subject: Also fix crash for assert statement For #407 --- src/vhdl/canon.adb | 4 ++-- testsuite/gna/issue407/test1.vhdl | 12 ++++++++++++ testsuite/gna/issue407/testsuite.sh | 3 +++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 testsuite/gna/issue407/test1.vhdl 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" -- cgit v1.2.3