diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-03-29 08:29:17 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-03-29 08:29:17 +0200 |
commit | 9f6ac61e196ccf49960bbdb2e7d71cdd96ddd10d (patch) | |
tree | 52c8103df73a69b209c354321ffd90540c966fc6 /testsuite | |
parent | 6739ef05016a6148f899be092a4e9bb4512d0d78 (diff) | |
download | ghdl-9f6ac61e196ccf49960bbdb2e7d71cdd96ddd10d.tar.gz ghdl-9f6ac61e196ccf49960bbdb2e7d71cdd96ddd10d.tar.bz2 ghdl-9f6ac61e196ccf49960bbdb2e7d71cdd96ddd10d.zip |
testsuite/synth: add tests for #1175
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/synth/issue1175/issue.vhdl | 14 | ||||
-rw-r--r-- | testsuite/synth/issue1175/issue2.vhdl | 10 | ||||
-rw-r--r-- | testsuite/synth/issue1175/issue3.vhdl | 13 | ||||
-rwxr-xr-x | testsuite/synth/issue1175/testsuite.sh | 14 |
4 files changed, 51 insertions, 0 deletions
diff --git a/testsuite/synth/issue1175/issue.vhdl b/testsuite/synth/issue1175/issue.vhdl new file mode 100644 index 000000000..f729452c7 --- /dev/null +++ b/testsuite/synth/issue1175/issue.vhdl @@ -0,0 +1,14 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity issue is + port (foo : in std_logic_vector(32-1 downto 0); + bar : out std_logic); +end issue; + +architecture rtl of issue is + alias a_bar is foo(foo'high); +begin + bar <= a_bar; +end architecture; diff --git a/testsuite/synth/issue1175/issue2.vhdl b/testsuite/synth/issue1175/issue2.vhdl new file mode 100644 index 000000000..9808a857a --- /dev/null +++ b/testsuite/synth/issue1175/issue2.vhdl @@ -0,0 +1,10 @@ +entity issue2 is + port (foo : in bit_vector(32-1 downto 0); + bar : out bit); +end issue2; + +architecture rtl of issue2 is + alias a_bar is foo(foo'high); +begin + bar <= a_bar; +end architecture; diff --git a/testsuite/synth/issue1175/issue3.vhdl b/testsuite/synth/issue1175/issue3.vhdl new file mode 100644 index 000000000..c7fb4a750 --- /dev/null +++ b/testsuite/synth/issue1175/issue3.vhdl @@ -0,0 +1,13 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity issue3 is + port (foo : in std_logic_vector(32-1 downto 0); + bar : out std_logic); +end issue3; + +architecture rtl of issue3 is + alias a_bar is foo(foo'high); +begin + bar <= a_bar; +end architecture; diff --git a/testsuite/synth/issue1175/testsuite.sh b/testsuite/synth/issue1175/testsuite.sh new file mode 100755 index 000000000..5c008e877 --- /dev/null +++ b/testsuite/synth/issue1175/testsuite.sh @@ -0,0 +1,14 @@ +#! /bin/sh + +. ../../testenv.sh + +synth_analyze issue +clean + +GHDL_STD_FLAGS=--std=08 +synth_analyze issue +synth_analyze issue2 +synth_analyze issue3 +clean + +echo "Test successful" |