aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue369/e.vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-06-18 21:00:14 +0200
committerTristan Gingold <tgingold@free.fr>2017-06-18 21:00:14 +0200
commitc8e0f3b2f183ac92b74c6cdbc32b4ef4464876d6 (patch)
treeeb02462a87328e2f2669c31e276e0393421773ea /testsuite/gna/issue369/e.vhdl
parent2a7b36fb2a33e2f01ef87acc60cf6ac397327e36 (diff)
downloadghdl-c8e0f3b2f183ac92b74c6cdbc32b4ef4464876d6.tar.gz
ghdl-c8e0f3b2f183ac92b74c6cdbc32b4ef4464876d6.tar.bz2
ghdl-c8e0f3b2f183ac92b74c6cdbc32b4ef4464876d6.zip
Add reproducer for #369
Diffstat (limited to 'testsuite/gna/issue369/e.vhdl')
-rw-r--r--testsuite/gna/issue369/e.vhdl17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/gna/issue369/e.vhdl b/testsuite/gna/issue369/e.vhdl
new file mode 100644
index 000000000..5bc91c03f
--- /dev/null
+++ b/testsuite/gna/issue369/e.vhdl
@@ -0,0 +1,17 @@
+entity e is end entity;
+architecture a of e is
+ -- type type_t is range integer'low to integer'high; -- Unlimited range works fine
+ type type_t is range 0 to integer'high; -- Limited range triggers CONSTRAINT_ERROR
+ procedure p1(variable t :in type_t) is begin end procedure;
+ procedure p2(variable t : out type_t) is begin t := 1; end procedure;
+ procedure p3(variable t :inout type_t) is begin t := t + 1; end procedure;
+begin
+ process
+ variable n :natural := 12;
+ begin
+ p1( t => type_t(n)); -- CONSTRAINT_ERROR
+ p2(integer(t) => n );
+ p3(integer(t) => type_t(n)); -- CONSTRAINT_ERROR
+ wait;
+ end process;
+end architecture;