aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/cobol.dg/group2/COMP-6_arithmetic.cob
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/cobol.dg/group2/COMP-6_arithmetic.cob')
-rw-r--r--gcc/testsuite/cobol.dg/group2/COMP-6_arithmetic.cob23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/cobol.dg/group2/COMP-6_arithmetic.cob b/gcc/testsuite/cobol.dg/group2/COMP-6_arithmetic.cob
new file mode 100644
index 0000000..6e8dc5c
--- /dev/null
+++ b/gcc/testsuite/cobol.dg/group2/COMP-6_arithmetic.cob
@@ -0,0 +1,23 @@
+ *> { dg-do run }
+ *> { dg-options "-dialect mf" }
+ *> { dg-output-file "group2/COMP-6_arithmetic.out" }
+
+ IDENTIFICATION DIVISION.
+ PROGRAM-ID. prog.
+ DATA DIVISION.
+ WORKING-STORAGE SECTION.
+ 01 X-99 PIC 99 USAGE COMP-6.
+ 01 X-999 PIC 999 USAGE COMP-6.
+ 01 B-99 USAGE BINARY-LONG UNSIGNED.
+ 01 B-999 USAGE BINARY-LONG UNSIGNED.
+ PROCEDURE DIVISION.
+ MOVE 99 TO B-99
+ MOVE B-99 TO X-99
+ MOVE 123 TO B-999
+ MOVE B-999 TO X-999
+ ADD X-99 X-999 GIVING B-99
+ END-ADD
+ DISPLAY B-99
+ END-DISPLAY
+ STOP RUN.
+