aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho/oread/tests/const2.on
diff options
context:
space:
mode:
Diffstat (limited to 'src/ortho/oread/tests/const2.on')
-rw-r--r--src/ortho/oread/tests/const2.on20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ortho/oread/tests/const2.on b/src/ortho/oread/tests/const2.on
new file mode 100644
index 000000000..89269bf47
--- /dev/null
+++ b/src/ortho/oread/tests/const2.on
@@ -0,0 +1,20 @@
+TYPE __ghdl_index_type IS UNSIGNED (32);
+
+PUBLIC FUNCTION inc (a : __ghdl_index_type) RETURN __ghdl_index_type;
+
+PUBLIC FUNCTION inc (a : __ghdl_index_type) RETURN __ghdl_index_type
+DECLARE
+BEGIN
+ RETURN a +# 1;
+END;
+
+PUBLIC FUNCTION main (a : __ghdl_index_type) RETURN __ghdl_index_type
+DECLARE
+BEGIN
+ DECLARE
+ PRIVATE CONSTANT cst : __ghdl_index_type;
+ CONSTANT cst := __ghdl_index_type'[1];
+ BEGIN
+ RETURN inc (a +# cst);
+ END;
+END;