aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-01-05 08:57:32 +0100
committerTristan Gingold <tgingold@free.fr>2018-01-05 08:57:32 +0100
commit97813f901e260c3ae1506c272651da3b09e0dcf1 (patch)
treeda1db89b742987489c26f8b1fc347d816d2c5d5b /testsuite
parent2fcecf812f92da9571aa3233a27c328791f25f44 (diff)
downloadghdl-97813f901e260c3ae1506c272651da3b09e0dcf1.tar.gz
ghdl-97813f901e260c3ae1506c272651da3b09e0dcf1.tar.bz2
ghdl-97813f901e260c3ae1506c272651da3b09e0dcf1.zip
Add reproducer for #516
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/issue516/reflection.vhdl11
-rwxr-xr-xtestsuite/gna/issue516/testsuite.sh10
2 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/gna/issue516/reflection.vhdl b/testsuite/gna/issue516/reflection.vhdl
new file mode 100644
index 000000000..e853625af
--- /dev/null
+++ b/testsuite/gna/issue516/reflection.vhdl
@@ -0,0 +1,11 @@
+package reflection is
+ type ENUMERATION_VALUE_MIRROR_PT is protected
+ impure function pos return INTEGER;
+ impure function image return STRING;
+ end protected;
+ type ENUMERATION_VALUE_MIRROR is access ENUMERATION_VALUE_MIRROR_PT;
+
+ type ENUMERATION_SUBTYPE_MIRROR_PT is protected
+ impure function enumeration_literal(literal_name : STRING) return ENUMERATION_VALUE_MIRROR;
+ end protected;
+end package;
diff --git a/testsuite/gna/issue516/testsuite.sh b/testsuite/gna/issue516/testsuite.sh
new file mode 100755
index 000000000..231755a3e
--- /dev/null
+++ b/testsuite/gna/issue516/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+export GHDL_STD_FLAGS=--std=08
+analyze_failure reflection.vhdl
+
+clean
+
+echo "Test successful"