summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.chill/result.ch
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.chill/result.ch')
-rw-r--r--gdb/testsuite/gdb.chill/result.ch29
1 files changed, 29 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.chill/result.ch b/gdb/testsuite/gdb.chill/result.ch
new file mode 100644
index 00000000000..b8c65e7d085
--- /dev/null
+++ b/gdb/testsuite/gdb.chill/result.ch
@@ -0,0 +1,29 @@
+test_result: MODULE
+
+ DCL i INT := 5;
+
+ SYNMODE m_struct = STRUCT (l LONG, b BOOL);
+ DCL v_struct m_struct := [ 20, TRUE ];
+
+ simple_func: PROC () RETURNS (INT);
+ DCL j INT := i;
+ RESULT 10;
+ i + := 2;
+ RESULT j + 2;
+ i + := 2;
+ END simple_func;
+
+ ret_struct: PROC () RETURNS (m_struct)
+ DCL v m_struct := [ 33, FALSE ];
+ RESULT v;
+ v.l := 18;
+ END ret_struct;
+
+ i := simple_func ();
+ i := simple_func ();
+ i * := 10;
+
+ v_struct := ret_struct ();
+
+ i := 33; -- for gdb
+END test_result;