[Bug cobol/126393] ICE: symbols_update: data item ... capacity rejected

simonsobisch at gnu dot org via Gcc-bugs <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126393

--- Comment #4 from Simon Sobisch <simonsobisch at gnu dot org> ---
and indeed, changing that to the standard

       01  Z01-SHMKEY.
         05 Z01-SHMKEY-ENV        PIC  X(06).
       01  Z01-SHMKEY-RED REDEFINES Z01-SHMKEY.
        03 filler OCCURS 6                     INDEXED BY Z01-IND.
         05 Z01-BYTE               PIC  99 COMP.

does compile


My suggestion would be to:

* ensure the diagnostic points to the data item (it _seems_ to point to end of
storage definition)
* mid-term: support that nonstandard option
* short-term: raise an error message on 01 OCCURS (or, if this is supposed to
commonly work: on OCCURS with REDEFINES on the same data item)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.