aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue1381
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-10-01 19:15:30 +0200
committerTristan Gingold <tgingold@free.fr>2021-10-01 19:15:30 +0200
commitf11aa29812b75a42771c9fef4f94474b886cf0f3 (patch)
tree0ff65d2d707e26a620db94a2ef7940a75b7b34a8 /testsuite/gna/issue1381
parentedb8566e50c6c6041cb31006ed4c11c7adb2831d (diff)
downloadghdl-f11aa29812b75a42771c9fef4f94474b886cf0f3.tar.gz
ghdl-f11aa29812b75a42771c9fef4f94474b886cf0f3.tar.bz2
ghdl-f11aa29812b75a42771c9fef4f94474b886cf0f3.zip
testsuite/gna: add tests for previous commit
Diffstat (limited to 'testsuite/gna/issue1381')
-rw-r--r--testsuite/gna/issue1381/repro4.vhdl2
-rw-r--r--testsuite/gna/issue1381/repro5.vhdl7
-rw-r--r--testsuite/gna/issue1381/repro6.vhdl8
-rwxr-xr-xtestsuite/gna/issue1381/testsuite.sh4
4 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/gna/issue1381/repro4.vhdl b/testsuite/gna/issue1381/repro4.vhdl
index 9a54e4027..e267fe2e1 100644
--- a/testsuite/gna/issue1381/repro4.vhdl
+++ b/testsuite/gna/issue1381/repro4.vhdl
@@ -6,7 +6,9 @@ architecture behav of repro4 is
is
variable n : natural := 2;
subtype st is natural range 1 to n;
+ constant b : st := 5;
begin
+ assert b /= 0;
return a;
end f;
begin
diff --git a/testsuite/gna/issue1381/repro5.vhdl b/testsuite/gna/issue1381/repro5.vhdl
new file mode 100644
index 000000000..013ea833d
--- /dev/null
+++ b/testsuite/gna/issue1381/repro5.vhdl
@@ -0,0 +1,7 @@
+entity repro5 is
+end;
+
+architecture behav of repro5 is
+ type states_t is (s0, s1, s2);
+begin
+end behav;
diff --git a/testsuite/gna/issue1381/repro6.vhdl b/testsuite/gna/issue1381/repro6.vhdl
new file mode 100644
index 000000000..7122e75cf
--- /dev/null
+++ b/testsuite/gna/issue1381/repro6.vhdl
@@ -0,0 +1,8 @@
+entity repro6 is
+end;
+
+architecture behav of repro6 is
+ type states_t is (s0, s1, s2);
+ subtype st1 is states_t range s0 to s1;
+begin
+end behav;
diff --git a/testsuite/gna/issue1381/testsuite.sh b/testsuite/gna/issue1381/testsuite.sh
index 10388ef94..7fb18901e 100755
--- a/testsuite/gna/issue1381/testsuite.sh
+++ b/testsuite/gna/issue1381/testsuite.sh
@@ -7,6 +7,10 @@ analyze_failure repro2.vhdl
analyze_failure repro3.vhdl
analyze -Wunused -Werror repro4.vhdl
+# Extra tests about -Wunused
+analyze_failure -Wunused -Werror repro5.vhdl
+analyze_failure -Wunused -Werror repro6.vhdl
+
clean
echo "Test successful"