[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [open-cobol-list] Internal Error
From: |
Robert Sherry |
Subject: |
RE: [open-cobol-list] Internal Error |
Date: |
Fri Mar 31 16:19:01 2006 |
Bill,
Thanks for the response. I meant to write:
SET Address of COUNTER1 TO COUNTER-PTR
I forget the address of in the statement. Assuming what I wrote would
compile, I would think the statement I wrote would move four bytes (the size
of a pointer) of data from COUNTER-PTR to COUNTER. If the compiler generated
a syntax error, that would be ok to.
Bob Sherry
-----Original Message-----
From: Bill Klein [mailto:address@hidden
Sent: Thursday, March 30, 2006 4:38 PM
To: 'Robert Sherry'; address@hidden
Subject: RE: [open-cobol-list] Internal Error
Out of curiosity, what do you think setting an integer-data-item to a
pointer SHOULD do?
If this were either
SET Address of COUNTER1 TO COUNTER-PTR
or
if COUNTER-PTR were redefined as a COMP (or COMP-5) item
then I could imagine "useful" output. I think that the original code should
cause a compiler error (but certainly NOT an "internal error)
________________________________
From: address@hidden
[mailto:address@hidden On Behalf Of Robert
Sherry
Sent: Thursday, March 30, 2006 10:15 AM
To: address@hidden
Subject: [open-cobol-list] Internal Error
When I compile the program below with the March Release
of the Open Source COBOL Compiler, the compiler comes up with an internal
error:
ID DIVISION.
PROGRAM-ID. ADD1.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
01 SIZE1 PIC 9(8) USAGE IS COMP-5
VALUE IS 4.
01 COUNTER-PTR USAGE IS POINTER.
LINKAGE SECTION.
01 COUNTER1 PIC 9(8) USAGE IS COMP.
PROCEDURE DIVISION.
SET COUNTER1 TO COUNTER-PTR.
The command use was:
cobc -x p12.cob
Here is what the compiler came back with:
typeck.c:2565: internal compiler error
Aborting compile of p12.cob at line 18
If I remove the set statement then the program then compiles with no
problem.
Bob Sherry