diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/gna/issue877/aa.vhdl | 4 | ||||
-rw-r--r-- | testsuite/gna/issue877/aa2.vhdl | 4 | ||||
-rw-r--r-- | testsuite/gna/issue877/tb.vhdl | 9 | ||||
-rw-r--r-- | testsuite/gna/issue877/tb2.vhdl | 14 | ||||
-rwxr-xr-x | testsuite/gna/issue877/testsuite.sh | 12 |
5 files changed, 43 insertions, 0 deletions
diff --git a/testsuite/gna/issue877/aa.vhdl b/testsuite/gna/issue877/aa.vhdl new file mode 100644 index 000000000..daa4f0876 --- /dev/null +++ b/testsuite/gna/issue877/aa.vhdl @@ -0,0 +1,4 @@ +package aa is +constant a : integer_vector(0 to 1) := (0, 1); +constant b : integer_vector(0 to 0) := a(integer range 0 to 0); +end package aa; diff --git a/testsuite/gna/issue877/aa2.vhdl b/testsuite/gna/issue877/aa2.vhdl new file mode 100644 index 000000000..dd0b7086f --- /dev/null +++ b/testsuite/gna/issue877/aa2.vhdl @@ -0,0 +1,4 @@ +package aa2 is +constant a : bit_vector(0 to 1) := ('0', '1'); +constant b : bit_vector(0 to 0) := a(integer range 0 to 0); +end package aa2; diff --git a/testsuite/gna/issue877/tb.vhdl b/testsuite/gna/issue877/tb.vhdl new file mode 100644 index 000000000..e88ab827f --- /dev/null +++ b/testsuite/gna/issue877/tb.vhdl @@ -0,0 +1,9 @@ +entity tb is +end tb; + +architecture behav of tb is + constant msg : string := "hello world"; +begin + assert msg (positive range 1 to 5) = "hello" severity failure; + assert msg (positive range 7 to 11) = "world"; +end behav; diff --git a/testsuite/gna/issue877/tb2.vhdl b/testsuite/gna/issue877/tb2.vhdl new file mode 100644 index 000000000..e590992b0 --- /dev/null +++ b/testsuite/gna/issue877/tb2.vhdl @@ -0,0 +1,14 @@ +entity tb is +end tb; + +architecture behav of tb is + constant msg : string := "hello world"; + procedure chk (b : natural) + is + subtype my_rng is natural range 1 to b; + begin + assert msg (chk.my_rng) = "hello"; + end chk; +begin + chk(5); +end behav; diff --git a/testsuite/gna/issue877/testsuite.sh b/testsuite/gna/issue877/testsuite.sh new file mode 100755 index 000000000..7a4443d03 --- /dev/null +++ b/testsuite/gna/issue877/testsuite.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze aa2.vhdl + +analyze tb.vhdl +elab_simulate tb + +clean + +echo "Test successful" |