aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-07-29 06:57:18 +0200
committerTristan Gingold <tgingold@free.fr>2022-07-29 08:14:08 +0200
commit1809c5b230bd464156c6ce44a118094a8e1a63b6 (patch)
tree62bccea89ee8ba6879a2bfd2e6cfe289878fbae0
parentb60c6d41f3e9e0b07351c8be0c88c31d60d6b0d7 (diff)
downloadghdl-1809c5b230bd464156c6ce44a118094a8e1a63b6.tar.gz
ghdl-1809c5b230bd464156c6ce44a118094a8e1a63b6.tar.bz2
ghdl-1809c5b230bd464156c6ce44a118094a8e1a63b6.zip
testsuite/gna: add a test for #2150
-rw-r--r--testsuite/gna/issue2150/e.vhdl31
-rw-r--r--testsuite/gna/issue2150/e1.vhdl13
-rw-r--r--testsuite/gna/issue2150/e2.vhdl13
-rw-r--r--testsuite/gna/issue2150/e3.vhdl13
-rw-r--r--testsuite/gna/issue2150/e4.vhdl9
-rwxr-xr-xtestsuite/gna/issue2150/testsuite.sh15
6 files changed, 94 insertions, 0 deletions
diff --git a/testsuite/gna/issue2150/e.vhdl b/testsuite/gna/issue2150/e.vhdl
new file mode 100644
index 000000000..4f0370bc4
--- /dev/null
+++ b/testsuite/gna/issue2150/e.vhdl
@@ -0,0 +1,31 @@
+entity e is end;
+
+architecture a of e is
+begin
+
+ ------------------------------------------------------------------------
+ -- There is no infinite loop when std.env.stop is unconditionally executed
+ ------------------------------------------------------------------------
+ process
+ begin
+ std.env.stop;
+ end process;
+
+ ------------------------------------------------------------------------
+ -- There is no infinite loop when there is an assertion with boolean
+ -- literal false and severity failiure that is unconditioinally executed
+ ------------------------------------------------------------------------
+ process
+ begin
+ assert false severity failure;
+ end process;
+
+ ------------------------------------------------------------------------
+ -- There is no infinite loop when a report statement with severity
+ -- failure is unconditionally executed
+ ------------------------------------------------------------------------
+ process
+ begin
+ report "" severity failure;
+ end process;
+end;
diff --git a/testsuite/gna/issue2150/e1.vhdl b/testsuite/gna/issue2150/e1.vhdl
new file mode 100644
index 000000000..f6f68c494
--- /dev/null
+++ b/testsuite/gna/issue2150/e1.vhdl
@@ -0,0 +1,13 @@
+entity e1 is end;
+
+architecture a of e1 is
+begin
+
+ ------------------------------------------------------------------------
+ -- There is no infinite loop when std.env.stop is unconditionally executed
+ ------------------------------------------------------------------------
+ process
+ begin
+ std.env.stop;
+ end process;
+end;
diff --git a/testsuite/gna/issue2150/e2.vhdl b/testsuite/gna/issue2150/e2.vhdl
new file mode 100644
index 000000000..c8d7fa29b
--- /dev/null
+++ b/testsuite/gna/issue2150/e2.vhdl
@@ -0,0 +1,13 @@
+entity e2 is end;
+
+architecture a of e2 is
+begin
+ ------------------------------------------------------------------------
+ -- There is no infinite loop when there is an assertion with boolean
+ -- literal false and severity failiure that is unconditioinally executed
+ ------------------------------------------------------------------------
+ process
+ begin
+ assert false severity failure;
+ end process;
+end;
diff --git a/testsuite/gna/issue2150/e3.vhdl b/testsuite/gna/issue2150/e3.vhdl
new file mode 100644
index 000000000..1851a7c8b
--- /dev/null
+++ b/testsuite/gna/issue2150/e3.vhdl
@@ -0,0 +1,13 @@
+entity e3 is end;
+
+architecture a of e3 is
+begin
+ ------------------------------------------------------------------------
+ -- There is no infinite loop when a report statement with severity
+ -- failure is unconditionally executed
+ ------------------------------------------------------------------------
+ process
+ begin
+ report "" severity failure;
+ end process;
+end;
diff --git a/testsuite/gna/issue2150/e4.vhdl b/testsuite/gna/issue2150/e4.vhdl
new file mode 100644
index 000000000..dac5ffa6a
--- /dev/null
+++ b/testsuite/gna/issue2150/e4.vhdl
@@ -0,0 +1,9 @@
+entity e4 is end;
+
+architecture a of e4 is
+begin
+ process
+ begin
+ report "" severity note;
+ end process;
+end;
diff --git a/testsuite/gna/issue2150/testsuite.sh b/testsuite/gna/issue2150/testsuite.sh
new file mode 100755
index 000000000..d64269be6
--- /dev/null
+++ b/testsuite/gna/issue2150/testsuite.sh
@@ -0,0 +1,15 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+export GHDL_STD_FLAGS="--std=08 -Werror=no-wait"
+
+analyze e.vhdl
+analyze e1.vhdl
+analyze e2.vhdl
+analyze e3.vhdl
+analyze_failure e4.vhdl
+
+clean
+
+echo "Test successful"