aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue1381/repro4.vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna/issue1381/repro4.vhdl')
-rw-r--r--testsuite/gna/issue1381/repro4.vhdl14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/gna/issue1381/repro4.vhdl b/testsuite/gna/issue1381/repro4.vhdl
new file mode 100644
index 000000000..9a54e4027
--- /dev/null
+++ b/testsuite/gna/issue1381/repro4.vhdl
@@ -0,0 +1,14 @@
+entity repro4 is
+end;
+
+architecture behav of repro4 is
+ impure function f(a : bit_vector) return bit_vector
+ is
+ variable n : natural := 2;
+ subtype st is natural range 1 to n;
+ begin
+ return a;
+ end f;
+begin
+ assert f("01") = "01";
+end behav;