From f11aa29812b75a42771c9fef4f94474b886cf0f3 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 1 Oct 2021 19:15:30 +0200 Subject: testsuite/gna: add tests for previous commit --- testsuite/gna/issue1381/repro4.vhdl | 2 ++ testsuite/gna/issue1381/repro5.vhdl | 7 +++++++ testsuite/gna/issue1381/repro6.vhdl | 8 ++++++++ testsuite/gna/issue1381/testsuite.sh | 4 ++++ 4 files changed, 21 insertions(+) create mode 100644 testsuite/gna/issue1381/repro5.vhdl create mode 100644 testsuite/gna/issue1381/repro6.vhdl (limited to 'testsuite') 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" -- cgit v1.2.3