aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue683/repro64.vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-11-14 06:40:31 +0100
committerTristan Gingold <tgingold@free.fr>2018-11-14 06:40:31 +0100
commit9d3b26ba8a0d024a47f12e311b6d586e2916751b (patch)
tree493cb6a41b0a68efcda9e511330d5cd4ec536ab7 /testsuite/gna/issue683/repro64.vhdl
parent279fcbc246fc6438756b76cd4d3d5f1f3e4e1463 (diff)
downloadghdl-9d3b26ba8a0d024a47f12e311b6d586e2916751b.tar.gz
ghdl-9d3b26ba8a0d024a47f12e311b6d586e2916751b.tar.bz2
ghdl-9d3b26ba8a0d024a47f12e311b6d586e2916751b.zip
Add reproducer for #683
Diffstat (limited to 'testsuite/gna/issue683/repro64.vhdl')
-rw-r--r--testsuite/gna/issue683/repro64.vhdl14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/gna/issue683/repro64.vhdl b/testsuite/gna/issue683/repro64.vhdl
new file mode 100644
index 000000000..72181523d
--- /dev/null
+++ b/testsuite/gna/issue683/repro64.vhdl
@@ -0,0 +1,14 @@
+entity repro64 is
+end repro64;
+
+architecture behav of repro64 is
+ type integer64 is range -2**62 to 2**62 - 2;
+
+ function exp2 (b : integer) return integer64 is
+ begin
+ return 2**b;
+ end exp2;
+begin
+ assert exp2(3) = 8 severity failure;
+ assert exp2(31) = 2**31 severity failure;
+end behav;