bug-gnucobol
[Top][All Lists]
Advanced

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

[open-cobol-list] LINAGE-COUNTER (Bug Report)


From: Peg
Subject: [open-cobol-list] LINAGE-COUNTER (Bug Report)
Date: Sun Nov 27 19:58:01 2005
User-agent: Thunderbird 1.5 (Windows/20051025)

The following codes cannot be compiled. (LINAGE-COUNTER + 1)

 IDENTIFICATION DIVISION.
 PROGRAM-ID. sample.
 ENVIRONMENT DIVISION.
 INPUT-OUTPUT SECTION.
 FILE-CONTROL.
     SELECT PRINT-FILE ASSIGN TO "print.txt".
 DATA DIVISION.
 FILE SECTION.
 FD  PRINT-FILE LINAGE IS 50 LINES.
 01  PRINT-REC PICTURE X(100).
 WORKING-STORAGE SECTION.
 PROCEDURE DIVISION.
     OPEN OUTPUT PRINT-FILE.
     IF  LINAGE-COUNTER + 1 = 1
         DISPLAY "FOGE"
     END-IF.
     CLOSE PRINT-FILE.

/tmp:$ cobc testline.cob -free

Unexpected tree tag 8
typeck.c:1154: internal compiler error
Aborting compile of testline.cob at line 15

It is likely to be able to evade by the following corrections.

cobc/tree.c ; 1136 (finalize_file Function)
//      f->linage_ctr = x;
        f->linage_ctr = cb_build_field_reference (CB_FIELD (x), 0);


Though it is unrelated to the above-mentioned,
 the compiler terminates abnormally by the following codes.

 IDENTIFICATION DIVISION.
 PROGRAM-ID. sample.
 ENVIRONMENT DIVISION.
 PROCEDURE DIVISION.
     OPEN OUTPUT PRINT-FILE.

/tmp:$ cobc testline.cob -free
testline.cob:5: Error: 'PRINT-FILE' undefined
testline.cob:5: Error: 'PRINT-FILE' not file name
Tag 1 0 Tag 2 10
tree.c:1202: invalid type cast from '#<unknown constant>' at testline.cob:5
Aborted (core dumped)

 IDENTIFICATION DIVISION.
 PROGRAM-ID. sample.
 ENVIRONMENT DIVISION.
 PROCEDURE DIVISION.
     IF  LINAGE-COUNTER = 1
         DISPLAY "FOGE"
     END-IF.

/tmp:$ cobc testline.cob -free
Segmentation fault (core dumped)

It is not preferable that the compiler terminates abnormally though
 these are random codes. Is there a good idea?

Regards,

-- 
Shigeyuki Kanbe
Peg, PegStyle mailto:address@hidden
http://members8.tsukaeru.net/pegstyle/


reply via email to

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