https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119805

            Bug ID: 119805
           Summary: COMP-5 / COMP-X issues
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: cobol
          Assignee: unassigned at gcc dot gnu.org
          Reporter: simonsobisch at gnu dot org
  Target Milestone: ---

program-id. cx.
   data division.
   working-storage section.
   77 var            comp-x pic x(08).
   procedure division.
       move 1230 to var  goback  .

this code does not compile


4:29: error: cannot set USAGE of var to Alphanumeric (from NumericBin5)
    4 |    77 var            comp-x pic x(08).
      |                             ^

it should compile with -dialect mf and gnu; when changing to comp-5 it does
compile with dialect mf but should also compile with dialect gnu; in all cases
those define an 8 byte machine-native numeric binary (=binary
truncation/overflow/max-val)
COMP-X may only be positive, PIC X is always positive.

Reply via email to