aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/cobol.dg/group2/PACKED-DECIMAL_arithmetic.cob
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/cobol.dg/group2/PACKED-DECIMAL_arithmetic.cob')
-rw-r--r--gcc/testsuite/cobol.dg/group2/PACKED-DECIMAL_arithmetic.cob24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/cobol.dg/group2/PACKED-DECIMAL_arithmetic.cob b/gcc/testsuite/cobol.dg/group2/PACKED-DECIMAL_arithmetic.cob
new file mode 100644
index 0000000..09303a2
--- /dev/null
+++ b/gcc/testsuite/cobol.dg/group2/PACKED-DECIMAL_arithmetic.cob
@@ -0,0 +1,24 @@
+ *> { dg-do run }
+ *> { dg-output-file "group2/PACKED-DECIMAL_arithmetic.out" }
+
+ IDENTIFICATION DIVISION.
+ PROGRAM-ID. prog.
+ DATA DIVISION.
+ WORKING-STORAGE SECTION.
+ 01 X PIC 99 USAGE PACKED-DECIMAL VALUE 0.
+ 01 Y PIC 99 USAGE PACKED-DECIMAL VALUE 9.
+ PROCEDURE DIVISION.
+ COMPUTE X = 1
+ END-COMPUTE.
+ DISPLAY X
+ END-DISPLAY.
+ COMPUTE X = Y
+ END-COMPUTE.
+ DISPLAY X
+ END-DISPLAY.
+ COMPUTE X = X + Y
+ END-COMPUTE.
+ DISPLAY X
+ END-DISPLAY.
+ STOP RUN.
+