aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-07-29 20:41:09 +0200
committerTristan Gingold <tgingold@free.fr>2021-07-29 20:41:09 +0200
commit06e02ea0b1e4662b707fdfd07eabc13f1e4ae84d (patch)
tree128308b5d03cacee72e38a2cd468b021197c59f9
parentfe638b2b62c22bd4b151a0ff00d53bf48a5c7f80 (diff)
downloadghdl-06e02ea0b1e4662b707fdfd07eabc13f1e4ae84d.tar.gz
ghdl-06e02ea0b1e4662b707fdfd07eabc13f1e4ae84d.tar.bz2
ghdl-06e02ea0b1e4662b707fdfd07eabc13f1e4ae84d.zip
testsuite/gna: add a case for #1824
-rw-r--r--testsuite/gna/issue1824/entity_1.vhdl19
-rwxr-xr-xtestsuite/gna/issue1824/testsuite.sh12
2 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/gna/issue1824/entity_1.vhdl b/testsuite/gna/issue1824/entity_1.vhdl
new file mode 100644
index 000000000..25596b57d
--- /dev/null
+++ b/testsuite/gna/issue1824/entity_1.vhdl
@@ -0,0 +1,19 @@
+entity entity_1 is
+end entity entity_1;
+
+architecture behav of entity_1 is
+begin
+ genIf: if True generate
+ constant G0 : boolean := False;
+ begin
+
+ elsif False generate
+ constant G1 : boolean := False;
+ begin
+
+ else generate
+ constant G2 : boolean := False;
+ begin
+
+ end generate;
+end architecture behav;
diff --git a/testsuite/gna/issue1824/testsuite.sh b/testsuite/gna/issue1824/testsuite.sh
new file mode 100755
index 000000000..9e0375736
--- /dev/null
+++ b/testsuite/gna/issue1824/testsuite.sh
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+export GHDL_STD_FLAGS=--std=08
+analyze -ds entity_1.vhdl 2> entity_1.dump
+cnt=$(grep -c if_generate_else entity_1.dump)
+test $cnt -eq 2
+
+clean
+
+echo "Test successful"