aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/ticket31/tb2.vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-01-10 08:16:19 +0100
committerTristan Gingold <tgingold@free.fr>2015-01-10 08:16:19 +0100
commitfafa25a6c0a1365bed4990e26d151e8140797730 (patch)
tree4610116cc944a35133e131508182eddfee043b51 /testsuite/gna/ticket31/tb2.vhdl
parentb467c5bb8e0c5e56eb756bf40a9dd548ef4c0633 (diff)
downloadghdl-fafa25a6c0a1365bed4990e26d151e8140797730.tar.gz
ghdl-fafa25a6c0a1365bed4990e26d151e8140797730.tar.bz2
ghdl-fafa25a6c0a1365bed4990e26d151e8140797730.zip
Add testcase from ticket31.
Diffstat (limited to 'testsuite/gna/ticket31/tb2.vhdl')
-rw-r--r--testsuite/gna/ticket31/tb2.vhdl12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/gna/ticket31/tb2.vhdl b/testsuite/gna/ticket31/tb2.vhdl
new file mode 100644
index 000000000..4b1922067
--- /dev/null
+++ b/testsuite/gna/ticket31/tb2.vhdl
@@ -0,0 +1,12 @@
+entity Tb2 is
+end;
+
+architecture top of Tb2 is
+ function get_m15 return real is
+ begin
+ return -1.5;
+ end get_m15;
+ constant int_2 : INTEGER := natural(get_m15);
+begin
+ assert FALSE report "17 - int_2 (natural(-1.5)): " & INTEGER'image(int_2) severity note;
+end;