aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho/oread/tests/run_declare.on
diff options
context:
space:
mode:
Diffstat (limited to 'src/ortho/oread/tests/run_declare.on')
-rw-r--r--src/ortho/oread/tests/run_declare.on16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ortho/oread/tests/run_declare.on b/src/ortho/oread/tests/run_declare.on
new file mode 100644
index 000000000..b0af18c9f
--- /dev/null
+++ b/src/ortho/oread/tests/run_declare.on
@@ -0,0 +1,16 @@
+type __ghdl_int is unsigned (32);
+
+public function main (a : __ghdl_int) return __ghdl_int
+declare
+ local var b : __ghdl_int;
+ local var z : __ghdl_int;
+begin
+ b := a;
+ declare
+ local var c : __ghdl_int;
+ begin
+ c := b;
+ z := c;
+ end;
+ return z +# 1;
+end;