diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-09-13 05:58:16 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-09-13 05:58:16 +0200 |
commit | 3c1f8e823971245cd228a068879fd7aafd93e291 (patch) | |
tree | cd6a00ec25ba7dc4742b6dcda760ae6fb8494cdf /testsuite/gna/issue413 | |
parent | d202c30eaaa47d30d80f870bdf665a6c96430fd8 (diff) | |
download | ghdl-3c1f8e823971245cd228a068879fd7aafd93e291.tar.gz ghdl-3c1f8e823971245cd228a068879fd7aafd93e291.tar.bz2 ghdl-3c1f8e823971245cd228a068879fd7aafd93e291.zip |
Add reproducer for #413
Diffstat (limited to 'testsuite/gna/issue413')
-rw-r--r-- | testsuite/gna/issue413/e.vhdl | 25 | ||||
-rwxr-xr-x | testsuite/gna/issue413/testsuite.sh | 9 |
2 files changed, 34 insertions, 0 deletions
diff --git a/testsuite/gna/issue413/e.vhdl b/testsuite/gna/issue413/e.vhdl new file mode 100644 index 000000000..d348ee1b5 --- /dev/null +++ b/testsuite/gna/issue413/e.vhdl @@ -0,0 +1,25 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity e is +end entity; + +architecture arch of e is + type t_record is record + int : integer; + end record; + + function conversion(slv : std_ulogic_vector) return t_record is + variable ret : t_record; + begin + ret.int := to_integer(unsigned(slv)); + return ret; + end; + + signal slv : std_ulogic_vector(127 downto 0); + alias alias_record : t_record is conversion(slv); + + signal s_int : integer := alias_record.int; +begin +end architecture; diff --git a/testsuite/gna/issue413/testsuite.sh b/testsuite/gna/issue413/testsuite.sh new file mode 100755 index 000000000..411883a4b --- /dev/null +++ b/testsuite/gna/issue413/testsuite.sh @@ -0,0 +1,9 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze_failure e.vhdl + +clean + +echo "Test successful" |