diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-08-03 05:47:33 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-08-03 05:47:33 +0200 |
commit | 0879429a561a059813462c6d37bd058d610c9816 (patch) | |
tree | ff50acb93b6b51a02fcdafe021f699e62f769663 /testsuite | |
parent | 06da7bad24f9ea25ed2f7098aa1ef9cb139bfda9 (diff) | |
download | ghdl-0879429a561a059813462c6d37bd058d610c9816.tar.gz ghdl-0879429a561a059813462c6d37bd058d610c9816.tar.bz2 ghdl-0879429a561a059813462c6d37bd058d610c9816.zip |
Add reproducer for #395
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/gna/issue395/e.vhdl | 8 | ||||
-rw-r--r-- | testsuite/gna/issue395/e1.vhdl | 7 | ||||
-rwxr-xr-x | testsuite/gna/issue395/testsuite.sh | 10 |
3 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/gna/issue395/e.vhdl b/testsuite/gna/issue395/e.vhdl new file mode 100644 index 000000000..bf1591d80 --- /dev/null +++ b/testsuite/gna/issue395/e.vhdl @@ -0,0 +1,8 @@ +entity e is end entity; +architecture a of e is + function f(b:integer:=0) return string is begin return "abc"; end function; + function f return string is begin return "def"; end function; + subtype r is integer range 1 to 2; +begin + assert false report "x: " & f(r) severity note; +end architecture; diff --git a/testsuite/gna/issue395/e1.vhdl b/testsuite/gna/issue395/e1.vhdl new file mode 100644 index 000000000..ec291ad51 --- /dev/null +++ b/testsuite/gna/issue395/e1.vhdl @@ -0,0 +1,7 @@ +entity e is end entity; +architecture a of e is + function f(b:integer:=0) return string is begin return "abc"; end function; + function f return string is begin return "def"; end function; +begin + assert false report "x: " & f(1 to 2) severity note; +end architecture; diff --git a/testsuite/gna/issue395/testsuite.sh b/testsuite/gna/issue395/testsuite.sh new file mode 100755 index 000000000..73c53cefc --- /dev/null +++ b/testsuite/gna/issue395/testsuite.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze_failure e.vhdl +analyze_failure e1.vhdl + +clean + +echo "Test successful" |