diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-07-14 07:34:16 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-07-14 07:34:16 +0200 |
commit | 162456bdbbfd341e1d755229e3ea48ca282e94ec (patch) | |
tree | b9b5235020ed410172e57f47ee589f2858d55a70 /testsuite/gna/issue384 | |
parent | 443cbd051e90942674d6b9aea01ed8b7a84a3cc4 (diff) | |
download | ghdl-162456bdbbfd341e1d755229e3ea48ca282e94ec.tar.gz ghdl-162456bdbbfd341e1d755229e3ea48ca282e94ec.tar.bz2 ghdl-162456bdbbfd341e1d755229e3ea48ca282e94ec.zip |
Add reproducer for #384
Diffstat (limited to 'testsuite/gna/issue384')
-rwxr-xr-x | testsuite/gna/issue384/testsuite.sh | 9 | ||||
-rw-r--r-- | testsuite/gna/issue384/yy.vhdl | 26 |
2 files changed, 35 insertions, 0 deletions
diff --git a/testsuite/gna/issue384/testsuite.sh b/testsuite/gna/issue384/testsuite.sh new file mode 100755 index 000000000..a4784e386 --- /dev/null +++ b/testsuite/gna/issue384/testsuite.sh @@ -0,0 +1,9 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze yy.vhdl + +clean + +echo "Test successful" diff --git a/testsuite/gna/issue384/yy.vhdl b/testsuite/gna/issue384/yy.vhdl new file mode 100644 index 000000000..d89c6dc15 --- /dev/null +++ b/testsuite/gna/issue384/yy.vhdl @@ -0,0 +1,26 @@ +library STD; +use STD.STANDARD.all; +use STD.TextIO; + +package test is + + function IMAGE (I : Integer) return string ; + +end package test; + +package body test is + + function IMAGE(i : Integer) return string is + variable l : TextIO.line ; + variable s : string(1 to 80); + variable r : Natural; + begin + TextIO.Write(l, i) ; + r := l'length; + TextIO.Read(l,s(1 to r)); + TextIO.Deallocate(l); + return s(1 to r) ; + end IMAGE ; + +end package body test; + |