diff options
author | Tristan Gingold <tgingold@free.fr> | 2014-01-17 02:57:06 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2014-01-17 02:57:06 +0100 |
commit | 6a7003f0c7f1afcb1198fdc18e0db0afbff7ac87 (patch) | |
tree | 06fc4ab4336f70e0bac0e2d9397d1d89a195a760 /testsuite/gna/bug21497/repro.vhdl | |
parent | 6dd41d6791e97118165c8e4af6f178188ab2bb45 (diff) | |
download | ghdl-6a7003f0c7f1afcb1198fdc18e0db0afbff7ac87.tar.gz ghdl-6a7003f0c7f1afcb1198fdc18e0db0afbff7ac87.tar.bz2 ghdl-6a7003f0c7f1afcb1198fdc18e0db0afbff7ac87.zip |
Fix bug21497: do not create an indirection for access to complex type.
Add a type check in mcode for New_Address.
Diffstat (limited to 'testsuite/gna/bug21497/repro.vhdl')
-rwxr-xr-x | testsuite/gna/bug21497/repro.vhdl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/gna/bug21497/repro.vhdl b/testsuite/gna/bug21497/repro.vhdl new file mode 100755 index 000000000..fe6e1c323 --- /dev/null +++ b/testsuite/gna/bug21497/repro.vhdl @@ -0,0 +1,19 @@ +entity tb is + generic (low : integer := 1 ; high : integer := 10); +end; + +architecture behav of tb is +begin + process + type st_arr1 is array (low to high) of integer; + + type st_arr2 is array (low to high) of st_arr1; + constant c_st_arr2 : st_arr2 := (others => (others => 1)); + + type a_st_arr2 is access st_arr2; + variable v_st_arr2 : a_st_arr2 := new st_arr2'(c_st_arr2) ; + begin + assert v_st_arr2.all = c_st_arr2 severity failure; + wait; + end process ; +end behav; |