aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue2080/ent.vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-06-12 16:47:00 +0200
committerTristan Gingold <tgingold@free.fr>2022-06-12 16:47:00 +0200
commit02eb84e95b6830c31e738baf85acadddcf3a3674 (patch)
tree65f6e2852a921204763ec5b9c8baf3d7791aaef3 /testsuite/synth/issue2080/ent.vhdl
parent72681c7245ff439706c0d6e7ff7b710b05eba3c8 (diff)
downloadghdl-02eb84e95b6830c31e738baf85acadddcf3a3674.tar.gz
ghdl-02eb84e95b6830c31e738baf85acadddcf3a3674.tar.bz2
ghdl-02eb84e95b6830c31e738baf85acadddcf3a3674.zip
testsuite/synth: add a test. close #2080
Diffstat (limited to 'testsuite/synth/issue2080/ent.vhdl')
-rw-r--r--testsuite/synth/issue2080/ent.vhdl35
1 files changed, 35 insertions, 0 deletions
diff --git a/testsuite/synth/issue2080/ent.vhdl b/testsuite/synth/issue2080/ent.vhdl
new file mode 100644
index 000000000..d667ddfe0
--- /dev/null
+++ b/testsuite/synth/issue2080/ent.vhdl
@@ -0,0 +1,35 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity identity is
+ port (
+ x: in std_logic_vector(7 downto 0);
+ y: out std_logic_vector(7 downto 0)
+ );
+end entity;
+
+architecture a of identity is
+begin
+ y <= x;
+end architecture;
+
+---
+
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity ent is
+ port (
+ a: in std_logic_vector(7 downto 0);
+ b: out std_logic_vector(7 downto 0)
+ );
+end entity;
+
+architecture a of ent is
+ function transform(val: std_logic_vector) return std_logic_vector is
+ begin
+ return (7 downto 0 => '0');
+ end function;
+begin
+ identity: entity work.identity port map (x => transform(a), y => b);
+end architecture;