gnucobol-users
[Top][All Lists]
Advanced

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

RE: [open-cobol-list] Internal Error


From: Bill Klein
Subject: RE: [open-cobol-list] Internal Error
Date: Thu Mar 30 13:39:13 2006

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





reply via email to

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