aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/synth/issue2021/ent.vhdl19
-rw-r--r--testsuite/synth/issue2021/repro1.vhdl15
-rw-r--r--testsuite/synth/issue2021/repro2.vhdl17
-rwxr-xr-xtestsuite/synth/issue2021/testsuite.sh10
4 files changed, 61 insertions, 0 deletions
diff --git a/testsuite/synth/issue2021/ent.vhdl b/testsuite/synth/issue2021/ent.vhdl
new file mode 100644
index 000000000..71c105feb
--- /dev/null
+++ b/testsuite/synth/issue2021/ent.vhdl
@@ -0,0 +1,19 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+entity ent is
+end ent;
+
+architecture ent of ent is
+ type my_record is record
+ field_a : std_logic_vector; -- Parametrized on instantiation
+ field_b : std_logic_vector(31 downto 0); -- Width set by generic
+ end record;
+
+ signal bar : my_record(field_a(7 downto 0));
+ signal baz : my_record(field_a(7 downto 0));
+
+begin
+
+end ent;
diff --git a/testsuite/synth/issue2021/repro1.vhdl b/testsuite/synth/issue2021/repro1.vhdl
new file mode 100644
index 000000000..0344f41cd
--- /dev/null
+++ b/testsuite/synth/issue2021/repro1.vhdl
@@ -0,0 +1,15 @@
+entity ent is
+end ent;
+
+architecture ent of ent is
+ type my_record is record
+ field_a : bit_vector; -- Parametrized on instantiation
+ field_b : bit_vector(31 downto 0); -- Width set by generic
+ end record;
+
+ signal bar : my_record(field_a(7 downto 0));
+ signal baz : my_record(field_a(7 downto 0));
+
+begin
+
+end ent;
diff --git a/testsuite/synth/issue2021/repro2.vhdl b/testsuite/synth/issue2021/repro2.vhdl
new file mode 100644
index 000000000..5f59f8dcf
--- /dev/null
+++ b/testsuite/synth/issue2021/repro2.vhdl
@@ -0,0 +1,17 @@
+entity repro2 is
+end;
+
+architecture ent of repro2 is
+ type my_record is record
+ field_a : bit_vector; -- Parametrized on instantiation
+ field_b : bit_vector;
+ end record;
+
+ subtype my_record1 is my_record (field_b(3 downto 0));
+
+ signal bar : my_record1(field_a(7 downto 0));
+ signal baz : my_record1(field_a(7 downto 0));
+
+begin
+
+end ent;
diff --git a/testsuite/synth/issue2021/testsuite.sh b/testsuite/synth/issue2021/testsuite.sh
new file mode 100755
index 000000000..c6c6c1ddf
--- /dev/null
+++ b/testsuite/synth/issue2021/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+GHDL_STD_FLAGS=--std=08
+synth_only repro1
+synth_only repro2
+synth_only ent
+
+echo "Test successful"