Skip to content

Commit

Permalink
testsuite/gna: add a case for #1824
Browse files Browse the repository at this point in the history
  • Loading branch information
tgingold committed Jul 29, 2021
1 parent fe638b2 commit 06e02ea
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
19 changes: 19 additions & 0 deletions testsuite/gna/issue1824/entity_1.vhdl
Original file line number Diff line number Diff line change
@@ -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;
12 changes: 12 additions & 0 deletions testsuite/gna/issue1824/testsuite.sh
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 06e02ea

Please sign in to comment.