From cf22e6dd1fc0fd7fea72252f8c1ae9d4a3c431cd Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 3 Aug 2021 03:51:30 +0200 Subject: testsuite/gna: add testcase for #1455 --- testsuite/gna/issue1455/pkg0.vhdl | 8 ++++++++ testsuite/gna/issue1455/pkg1.vhdl | 8 ++++++++ testsuite/gna/issue1455/pkg2.vhdl | 9 +++++++++ testsuite/gna/issue1455/pkg3.vhdl | 8 ++++++++ testsuite/gna/issue1455/pkg4.vhdl | 8 ++++++++ testsuite/gna/issue1455/pkg5.vhdl | 8 ++++++++ testsuite/gna/issue1455/pkg6.vhdl | 8 ++++++++ testsuite/gna/issue1455/tb.vhdl | 12 ++++++++++++ testsuite/gna/issue1455/tb1.vhdl | 8 ++++++++ testsuite/gna/issue1455/testsuite.sh | 18 ++++++++++++++++++ 10 files changed, 95 insertions(+) create mode 100644 testsuite/gna/issue1455/pkg0.vhdl create mode 100644 testsuite/gna/issue1455/pkg1.vhdl create mode 100644 testsuite/gna/issue1455/pkg2.vhdl create mode 100644 testsuite/gna/issue1455/pkg3.vhdl create mode 100644 testsuite/gna/issue1455/pkg4.vhdl create mode 100644 testsuite/gna/issue1455/pkg5.vhdl create mode 100644 testsuite/gna/issue1455/pkg6.vhdl create mode 100644 testsuite/gna/issue1455/tb.vhdl create mode 100644 testsuite/gna/issue1455/tb1.vhdl create mode 100755 testsuite/gna/issue1455/testsuite.sh (limited to 'testsuite') diff --git a/testsuite/gna/issue1455/pkg0.vhdl b/testsuite/gna/issue1455/pkg0.vhdl new file mode 100644 index 000000000..3ec9b7180 --- /dev/null +++ b/testsuite/gna/issue1455/pkg0.vhdl @@ -0,0 +1,8 @@ +package pkg0 is + type my_arr2D_t is array (natural range <>) of real_vector; + + constant my_arr2D: my_arr2D_t(0 to 1)(0 to 1) := ( + (0.0, 0.1), + (1.0, 1.1) + ); +end; diff --git a/testsuite/gna/issue1455/pkg1.vhdl b/testsuite/gna/issue1455/pkg1.vhdl new file mode 100644 index 000000000..641671f20 --- /dev/null +++ b/testsuite/gna/issue1455/pkg1.vhdl @@ -0,0 +1,8 @@ +package pkg1 is + type my_arr2D_t is array (natural range <>) of real_vector; + + constant my_arr2D: my_arr2D_t := ( + (0.0, 0.1), + (1.0, 1.1) + ); +end; diff --git a/testsuite/gna/issue1455/pkg2.vhdl b/testsuite/gna/issue1455/pkg2.vhdl new file mode 100644 index 000000000..14ff15d03 --- /dev/null +++ b/testsuite/gna/issue1455/pkg2.vhdl @@ -0,0 +1,9 @@ +package pkg2 is + type my_arr2D_t is array (natural range <>) of real_vector; + + constant my_arr2D: my_arr2D_t(0 to 1) := ( + (0.0, 0.1), + (1.0, 1.1) + ); +end; + diff --git a/testsuite/gna/issue1455/pkg3.vhdl b/testsuite/gna/issue1455/pkg3.vhdl new file mode 100644 index 000000000..ea3848150 --- /dev/null +++ b/testsuite/gna/issue1455/pkg3.vhdl @@ -0,0 +1,8 @@ +package pkg3 is + type my_arr2D_t is array (0 to 1) of real_vector; + + constant my_arr2D: my_arr2D_t := ( + (0.0, 0.1), + (1.0, 1.1) + ); +end; diff --git a/testsuite/gna/issue1455/pkg4.vhdl b/testsuite/gna/issue1455/pkg4.vhdl new file mode 100644 index 000000000..d541b833c --- /dev/null +++ b/testsuite/gna/issue1455/pkg4.vhdl @@ -0,0 +1,8 @@ +package pkg4 is + type my_arr2D_t is array (0 to 1) of real_vector; + + constant my_arr2D: my_arr2D_t(0 to 1) := ( + (0.0, 0.1), + (1.0, 1.1) + ); +end; diff --git a/testsuite/gna/issue1455/pkg5.vhdl b/testsuite/gna/issue1455/pkg5.vhdl new file mode 100644 index 000000000..a196d7a59 --- /dev/null +++ b/testsuite/gna/issue1455/pkg5.vhdl @@ -0,0 +1,8 @@ +package pkg5 is + type my_arr2D_t is array (0 to 1) of real_vector; + + constant my_arr2D: my_arr2D_t(open)(0 to 1) := ( + (0.0, 0.1), + (1.0, 1.1) + ); +end; diff --git a/testsuite/gna/issue1455/pkg6.vhdl b/testsuite/gna/issue1455/pkg6.vhdl new file mode 100644 index 000000000..4d0a97c2f --- /dev/null +++ b/testsuite/gna/issue1455/pkg6.vhdl @@ -0,0 +1,8 @@ +package pkg6 is + type my_arr2D_t is array (0 to 1) of real_vector; + + constant my_arr2D: my_arr2D_t(0 to 1)(0 to 1) := ( + (0.0, 0.1), + (1.0, 1.1) + ); +end; diff --git a/testsuite/gna/issue1455/tb.vhdl b/testsuite/gna/issue1455/tb.vhdl new file mode 100644 index 000000000..736cd6674 --- /dev/null +++ b/testsuite/gna/issue1455/tb.vhdl @@ -0,0 +1,12 @@ +entity tb is +end tb; + +use work.pkg0.all; +use work.pkg1.all; +use work.pkg2.all; +use work.pkg3.all; +use work.pkg5.all; + +architecture behav of tb is +begin +end behav; diff --git a/testsuite/gna/issue1455/tb1.vhdl b/testsuite/gna/issue1455/tb1.vhdl new file mode 100644 index 000000000..55796aab1 --- /dev/null +++ b/testsuite/gna/issue1455/tb1.vhdl @@ -0,0 +1,8 @@ +entity tb1 is +end tb1; + +use work.pkg1.all; + +architecture behav of tb1 is +begin +end behav; diff --git a/testsuite/gna/issue1455/testsuite.sh b/testsuite/gna/issue1455/testsuite.sh new file mode 100755 index 000000000..9c1982e67 --- /dev/null +++ b/testsuite/gna/issue1455/testsuite.sh @@ -0,0 +1,18 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze pkg0.vhdl +analyze pkg1.vhdl +analyze pkg2.vhdl +analyze pkg3.vhdl +analyze_failure pkg4.vhdl +analyze pkg5.vhdl +analyze_failure pkg6.vhdl + +analyze tb.vhdl +elab_simulate tb +clean + +echo "Test successful" -- cgit v1.2.3