bug-gnucobol
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [open-cobol-list] Bug Report and Fix


From: Robert Sherry
Subject: RE: [open-cobol-list] Bug Report and Fix
Date: Thu Nov 17 13:18:01 2005

William,

     What is an RCF?

Bob Sherry

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of William M.
Klein
Sent: Thursday, November 17, 2005 4:00 PM
To: 'Robert Sherry'; 'Robert Sherry'; address@hidden
Subject: RE: [open-cobol-list] Bug Report and Fix

Please recompile with FLAG(I,I) and then send the entire compiler listing.
If (and I do believe you) that it gets no compile-time messages (I-level or
above), then I will do an RCF - if you don't. 

NOTE: 
  This has NOTHING to do with the linkage item maintaining addressability
between CALLs.  I just want to figure out what is happening with the BY
REFERENCE "literal".

-----Original Message-----
From: Robert Sherry [mailto:address@hidden 
Sent: Thursday, November 17, 2005 8:34 AM
To: address@hidden; 'Robert Sherry';
address@hidden
Subject: RE: [open-cobol-list] Bug Report and Fix


    The program I posted to the group to start this thread ran succuessfully
under this compiler: PP 5655-G53 IBM ENTERPRISE COBOL FOR Z/OS 3.3.1 DATE
11. The following parameters were used:
NOADV,APOST,FSRT,OFF,MAP,RENT,X,F(W,E),NOC(E),
NUMPROC(NOPFD),TRUNC(BIN),OPT(FULL)

The program compiled and ran without errors.

Bob Sherry

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of William M.
Klein
Sent: Wednesday, November 16, 2005 6:31 PM
To: 'Robert Sherry'; address@hidden
Subject: RE: [open-cobol-list] Bug Report and Fix

Robert,
   For my information, what dialect allows a 

  CALL whatever Using "alphanumeric literal"

Instead of
  
  Call whatever using by Content/Value "alphanumeric literal"

The first SHOULD default to "BY REFERENCE" which should NOT allow an
alphanumeric literal as the argument.

________________________________

From: address@hidden
[mailto:address@hidden On Behalf Of Robert
Sherry
Sent: Wednesday, November 16, 2005 12:59 PM
To: address@hidden
Subject: [open-cobol-list] Bug Report and Fix



Gentlemen (Including Roger While),

 

First, I claim that variables defined in the COBOL LINKAGE SECTION need to
hold their values between subroutine calls. This is not currently happening
in the latest version of the Open Source COBOL COMPILER. Please consider the
following two COBOL Programs. It consists of a main program and a
subroutine:

 

Main Program:

 

       IDENTIFICATION DIVISION.

       PROGRAM-ID. top1.

 

       ENVIRONMENT DIVISION.

       CONFIGURATION SECTION.

       DATA DIVISION.

       WORKING-STORAGE SECTION.

       01 FUN-NAME PIC X(8) VALUE 'FOO'.

       PROCEDURE DIVISION.

           CALL 'bot' USING '1' FUN-NAME.

           CALL 'bot' USING '0'.

           GOBACK.

 

Subroutine:

 

       IDENTIFICATION DIVISION.

       PROGRAM-ID. bot.

 

       ENVIRONMENT DIVISION.

       CONFIGURATION SECTION.

       DATA DIVISION.

       WORKING-STORAGE SECTION.

       LINKAGE SECTION.

       01 LN-MODE PIC X(1).

       01 LN-VAL PIC X(8).

       01 LN-NAME PIC X(8).

       PROCEDURE DIVISION USING LN-MODE LN-VAL.

           IF LN-MODE = '1'

             SET ADDRESS OF LN-NAME TO ADDRESS OF LN-VAL

           ELSE

             DISPLAY 'NAME=' LN-NAME

           END-IF.

           GOBACK.

 

When compiled with the latest version of the Open Source COBOL Compiler the
above programs dies with a core dump. The function output_internal_function
has the following line of code:

                 output_line ("unsigned char *%s%d = NULL;", CB_PREFIX_BASE,
f->id);

 

This line of code puts out the data variable definitions for COBOL data
items defined in the LINKAGE SECTION. I claim that the above bug can be
fixed by chaning the above line to:

                 output_line ("static unsigned char *%s%d = NULL;",
CB_PREFIX_BASE, f->id);

 

Bob Sherry

            




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam for All
Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
open-cobol-list mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/open-cobol-list




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
open-cobol-list mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/open-cobol-list



reply via email to

[Prev in Thread] Current Thread [Next in Thread]