|
From: | Ron Norman |
Subject: | Re: [Bug-GnuCOBOL] segfault |
Date: | Wed, 29 Mar 2017 14:22:49 -0400 |
Hi Folkert,
I think this test is incorrect, as it is up to compiler how to pass the constants (as a COMP-4 or "native integer", i.e. COMP-5)
Microfocus sends as COMP-4 to be closer to mainframe, which is BIG-ENDIAN, and of course this test will be okay on any BIG-ENDIAN platform.
Gnu is passing native integer.
Regards,
SK
On 3/29/2017 9:38 AM, folkert wrote:
Hi,
I have the following two sources. When run, it runs fine under micro
focus but segfaults under opencobol 1.1.0.
I'm not 100% sure this is valid cobol code, only a beginner :-)
test3.cob
---------
IDENTIFICATION DIVISION.
PROGRAM-ID. TESTD.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
DATA DIVISION.
WORKING-STORAGE SECTION.
PROCEDURE DIVISION.
MAIN.
CALL 'SOMEFUNC' USING 5, 'TESTD'
GOBACK.
END PROGRAM TESTD.
SOMEFUNC.cbl
------------
IDENTIFICATION DIVISION.
PROGRAM-ID. SOMEFUNC.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
LINKAGE SECTION.
01 ARG-LEN PIC S9(09) COMP.
01 PGM-NAME PIC X(20).
PROCEDURE DIVISION USING ARG-LEN, PGM-NAME.
DISPLAY '==> Starting ', PGM-NAME(1:ARG-LEN)
GOBACK.
END PROGRAM SOMEFUNC.
Folkert van Heusden
[Prev in Thread] | Current Thread | [Next in Thread] |