diff options
Diffstat (limited to 'testsuite/gna/issue1765')
-rw-r--r-- | testsuite/gna/issue1765/ent.vhdl | 28 | ||||
-rw-r--r-- | testsuite/gna/issue1765/ent93.vhdl | 28 | ||||
-rwxr-xr-x | testsuite/gna/issue1765/testsuite.sh | 14 |
3 files changed, 70 insertions, 0 deletions
diff --git a/testsuite/gna/issue1765/ent.vhdl b/testsuite/gna/issue1765/ent.vhdl new file mode 100644 index 000000000..c2f21f62e --- /dev/null +++ b/testsuite/gna/issue1765/ent.vhdl @@ -0,0 +1,28 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +--use work.TestPkg.all ; + +entity test is + port( + input : in unsigned ; + output : out unsigned + ); +end entity; + +architecture rtl of test is +alias A is Output ; -- does not work +-- alias A : unsigned(output'range) is Output ; -- Works +-- alias A : output'subtype is Output ; -- Works + +begin + A <= (output'range => '0') ; + + process + begin + wait on input ; -- Suppress first run + report "input = " & to_hstring(input) ; + end process ; + +end architecture ; diff --git a/testsuite/gna/issue1765/ent93.vhdl b/testsuite/gna/issue1765/ent93.vhdl new file mode 100644 index 000000000..3ac359299 --- /dev/null +++ b/testsuite/gna/issue1765/ent93.vhdl @@ -0,0 +1,28 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +--use work.TestPkg.all ; + +entity test is + port( + input : in unsigned ; + output : out unsigned + ); +end entity; + +architecture rtl of test is +alias A is Output ; -- does not work +-- alias A : unsigned(output'range) is Output ; -- Works +-- alias A : output'subtype is Output ; -- Works + +begin + A <= (output'range => '0') ; + + process + begin + wait on input ; -- Suppress first run +-- report "input = " & to_hstring(input) ; + end process ; + +end architecture ; diff --git a/testsuite/gna/issue1765/testsuite.sh b/testsuite/gna/issue1765/testsuite.sh new file mode 100755 index 000000000..644614735 --- /dev/null +++ b/testsuite/gna/issue1765/testsuite.sh @@ -0,0 +1,14 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze ent93.vhdl + +clean + +export GHDL_STD_FLAGS=--std=08 +analyze ent.vhdl + +clean + +echo "Test successful" |