bug-gnucobol
[Top][All Lists]
Advanced

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

[Bug-GnuCOBOL] cobc compiler error on CALL with SPACES


From: Christian Garbs
Subject: [Bug-GnuCOBOL] cobc compiler error on CALL with SPACES
Date: Thu, 28 Mar 2019 14:06:56 +0100
User-agent: NeoMutt/20170113 (1.7.2)

Hi there,

cobc told me to report this as a bug, so I'll do that :-)

When compiling this small example program:


       IDENTIFICATION DIVISION.
       PROGRAM-ID. EXAMPLE.

       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01 SOME-FIELD             PIC XXX  VALUE 'FOO'.

       PROCEDURE DIVISION.
           CALL "MODULE" USING SOME-FIELD
                               SPACE
           END-CALL
       EXIT.

       END PROGRAM EXAMPLE.
       

cobc throws this error:


  $ cobc EXAMPLE.CBL
  cobc: unexpected tree tag: 0
  cobc: codegen.c: 1124: internal compiler error

  cobc: aborting codegen for EXAMPLE.CBL (PROGRAM-ID: EXAMPLE)
  cobc: Please report this!


When I change the SPACES argument to CALL to '' like this


       PROCEDURE DIVISION.
           CALL "MODULE" USING SOME-FIELD
                               ''
           END-CALL
       EXIT.


I get this result instead:


  $ cobc EXAMPLE.CBL
  EXAMPLE.CBL:10: warning: alphanumeric literal has zero length; a SPACE will 
be assumed


The warning looks reasonable, but applying the suggested fix results
in the original error.


I use this version (self-compiled) under Ubuntu 18.04 LTS:

  cobc --version
  cobc (GnuCOBOL) 3.0-rc1.0
  Copyright (C) 2018 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  Written by Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward 
Hart
  Built     Mar 25 2019 15:37:10
  Packaged  Apr 22 2018 22:26:54 UTC
  C version "7.3.0"


Regards
Christian
-- 
....Christian.Garbs....................................https://www.cgarbs.de

First rule of hardware acquisition:   If you have it, never give it back.
Second rule of hardware acquisition:  If asked, you always require more.
Third rule of hardware acquisition:   If not asked, complain.



reply via email to

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