aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue1201
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-04-10 17:15:59 +0200
committerTristan Gingold <tgingold@free.fr>2020-04-10 17:15:59 +0200
commitdb95e8c9bb4c9881be2fc41e3fb5a42d192728a1 (patch)
treeb43e0e668614fd9b563ef5e4c5bcea614485f3a5 /testsuite/gna/issue1201
parent095190fbeeb05c746275947167dcbef5a22f7df5 (diff)
downloadghdl-db95e8c9bb4c9881be2fc41e3fb5a42d192728a1.tar.gz
ghdl-db95e8c9bb4c9881be2fc41e3fb5a42d192728a1.tar.bz2
ghdl-db95e8c9bb4c9881be2fc41e3fb5a42d192728a1.zip
testsuite/gna: add case for #1201
Diffstat (limited to 'testsuite/gna/issue1201')
-rw-r--r--testsuite/gna/issue1201/bug.vhdl40
-rwxr-xr-xtestsuite/gna/issue1201/testsuite.sh11
2 files changed, 51 insertions, 0 deletions
diff --git a/testsuite/gna/issue1201/bug.vhdl b/testsuite/gna/issue1201/bug.vhdl
new file mode 100644
index 000000000..9a11dbeeb
--- /dev/null
+++ b/testsuite/gna/issue1201/bug.vhdl
@@ -0,0 +1,40 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity bug is
+ port (clk : in std_logic;
+ rst : in std_logic);
+end entity bug;
+
+architecture Behavioral of bug is
+
+ type rc_params is array (natural range <>) of std_logic_vector(7 downto 0);
+ type rc_params_array is array (natural range <>) of rc_params;
+
+ type rc_peripheral_1 is record
+ clk : std_logic;
+ params : rc_params;
+ enable : std_logic;
+ rd : std_logic;
+ data : std_logic_vector(7 downto 0);
+ empty : std_logic;
+ end record rc_peripheral_1;
+
+ type rc_peripheral_2 is record
+ clk : std_logic;
+ params : rc_params_array;
+ enable : std_logic;
+ rd : std_logic;
+ data : std_logic_vector(7 downto 0);
+ empty : std_logic;
+ end record rc_peripheral_2;
+
+ signal mysig_ok : rc_params_array(0 to 4)(0 to 4); -- This is accepted by ghdl
+
+ signal mysig_ok_2 : rc_peripheral_1(params(0 to 4)); -- This is accepted by ghdl
+
+ -- signal mysig_wrong : rc_peripheral_2(params(0 to 4)(0 to 4)); -- This is not accepted
+
+begin
+
+end architecture Behavioral;
diff --git a/testsuite/gna/issue1201/testsuite.sh b/testsuite/gna/issue1201/testsuite.sh
new file mode 100755
index 000000000..3eaaab5d9
--- /dev/null
+++ b/testsuite/gna/issue1201/testsuite.sh
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+export GHDL_STD_FLAGS=--std=08
+analyze bug.vhdl
+elab_simulate bug
+
+clean
+
+echo "Test successful"