aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-04-12 23:29:14 +0200
committerTristan Gingold <tgingold@free.fr>2020-04-12 23:31:21 +0200
commit81ad114f07bebf66d337049303998879d1881ccd (patch)
treefba387f48cdeba0cc0f9067f085f99784050f0a6
parent3cfe2f9a62f7444cfb00c7c86a67aada2f7bae3f (diff)
downloadghdl-81ad114f07bebf66d337049303998879d1881ccd.tar.gz
ghdl-81ad114f07bebf66d337049303998879d1881ccd.tar.bz2
ghdl-81ad114f07bebf66d337049303998879d1881ccd.zip
testsuite/synth: add test for #1217
-rw-r--r--testsuite/synth/issue1217/tb_top.vhdl21
-rwxr-xr-xtestsuite/synth/issue1217/testsuite.sh7
-rw-r--r--testsuite/synth/issue1217/top.vhdl26
3 files changed, 54 insertions, 0 deletions
diff --git a/testsuite/synth/issue1217/tb_top.vhdl b/testsuite/synth/issue1217/tb_top.vhdl
new file mode 100644
index 000000000..df2e7e8a1
--- /dev/null
+++ b/testsuite/synth/issue1217/tb_top.vhdl
@@ -0,0 +1,21 @@
+entity tb_top is
+end tb_top;
+
+library ieee;
+use ieee.std_logic_1164.all;
+
+architecture behav of tb_top is
+ signal p : std_logic;
+ signal q : std_logic;
+begin
+ dut: entity work.top
+ port map (p, q);
+
+ process
+ begin
+ wait for 1 ns;
+ assert p = '0' severity failure;
+ assert q = '1' severity failure;
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/synth/issue1217/testsuite.sh b/testsuite/synth/issue1217/testsuite.sh
new file mode 100755
index 000000000..60399a753
--- /dev/null
+++ b/testsuite/synth/issue1217/testsuite.sh
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+synth_tb top
+
+echo "Test successful"
diff --git a/testsuite/synth/issue1217/top.vhdl b/testsuite/synth/issue1217/top.vhdl
new file mode 100644
index 000000000..98305667c
--- /dev/null
+++ b/testsuite/synth/issue1217/top.vhdl
@@ -0,0 +1,26 @@
+library IEEE;
+use IEEE.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+entity top is
+port (p, q : out std_logic);
+end entity;
+
+architecture arch of top is
+ type subrecord_r is record
+ c : std_logic;
+ d : std_logic;
+ end record;
+ type record_r is record
+ s : subrecord_r;
+ a : std_logic;
+ b : std_logic;
+ end record;
+ signal s : subrecord_r;
+ signal r : record_r;
+begin
+ s <= ('0', '0');
+ r <= (s, '0', '1');
+ p <= r.a;
+ q <= r.b;
+end architecture;