diff options
-rw-r--r-- | testsuite/gna/issue212/test.vhdl | 45 | ||||
-rwxr-xr-x | testsuite/gna/issue212/testsuite.sh | 9 |
2 files changed, 54 insertions, 0 deletions
diff --git a/testsuite/gna/issue212/test.vhdl b/testsuite/gna/issue212/test.vhdl new file mode 100644 index 000000000..c322888f2 --- /dev/null +++ b/testsuite/gna/issue212/test.vhdl @@ -0,0 +1,45 @@ +PACKAGE test_pkg IS + + TYPE test_record_t IS RECORD + number : integer; + END RECORD test_record_t; + + FUNCTION set_test_record_default + RETURN test_record_t; + + FUNCTION set_test_record ( + CONSTANT C_TEST : test_record_t := set_test_record_default) + RETURN test_record_t; + +END PACKAGE test_pkg; + +PACKAGE BODY test_pkg IS + + FUNCTION set_test_record_default + RETURN test_record_t IS + VARIABLE result : test_record_t; + BEGIN + result.number := 0; + RETURN result; + END set_test_record_default; + + FUNCTION set_test_record ( + CONSTANT C_TEST : test_record_t := set_test_record_default) + RETURN test_record_t IS + BEGIN + RETURN C_TEST; + END set_test_record; + +END PACKAGE BODY test_pkg; + +ENTITY test IS +END ENTITY test; + +LIBRARY work; +USE work.test_pkg.set_test_record; + +ARCHITECTURE rtl OF test IS + +BEGIN + +END ARCHITECTURE rtl; diff --git a/testsuite/gna/issue212/testsuite.sh b/testsuite/gna/issue212/testsuite.sh new file mode 100755 index 000000000..f8534f54e --- /dev/null +++ b/testsuite/gna/issue212/testsuite.sh @@ -0,0 +1,9 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze test.vhdl + +clean + +echo "Test successful" |