aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue1163/bug3.vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-03-20 07:44:09 +0100
committerTristan Gingold <tgingold@free.fr>2020-03-20 07:44:09 +0100
commit27824b89e270759419cf9854e7470388acfa7716 (patch)
treefa90120062b372ec18135ca948b7b9dd1056bbdb /testsuite/synth/issue1163/bug3.vhdl
parentdceedf5badd55a00522fc8ccaba110a6b8ab571b (diff)
downloadghdl-27824b89e270759419cf9854e7470388acfa7716.tar.gz
ghdl-27824b89e270759419cf9854e7470388acfa7716.tar.bz2
ghdl-27824b89e270759419cf9854e7470388acfa7716.zip
testsuite/synth: add tests for #1163
Diffstat (limited to 'testsuite/synth/issue1163/bug3.vhdl')
-rw-r--r--testsuite/synth/issue1163/bug3.vhdl27
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/synth/issue1163/bug3.vhdl b/testsuite/synth/issue1163/bug3.vhdl
new file mode 100644
index 000000000..071972d37
--- /dev/null
+++ b/testsuite/synth/issue1163/bug3.vhdl
@@ -0,0 +1,27 @@
+library IEEE;
+use IEEE.std_logic_1164.all;
+use IEEE.numeric_std.all;
+
+entity bug is
+ port(index : in integer range 0 to 1);
+end bug;
+
+architecture behav of bug is
+
+ type foobar is record
+ foo : std_logic;
+ bar : std_logic_vector(1 downto 0);
+ end record;
+
+ -- Changing the order works:
+ --type foobar is record
+ -- bar : std_logic_vector(1 downto 0);
+ -- foo : std_logic;
+ --end record;
+
+ type foobar_array is array (0 to 1) of foobar;
+
+ signal s_foobar : foobar_array;
+begin
+ s_foobar(index).bar(0) <= '0';
+end architecture;