https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123764
Bug ID: 123764
Summary: cobol: regression in PICTURE handling
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: cobol
Assignee: unassigned at gcc dot gnu.org
Reporter: simonsobisch at gnu dot org
Target Milestone: ---
The following code
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 CALC-COMMISSION-FIELDS.
05 filler PIC X value ">".
05 CALC-SALES PIC 9(6)V99, VALUE 12.34.
05 filler pic x value "<".
PROCEDURE DIVISION.
DISPLAY CALC-COMMISSION-FIELDS.
STOP RUN.
results in
<source>:7:34: error: CALC-SALES: PICTURE and VALUE are incompatible
7 | 05 CALC-SALES PIC 9(6)V99, VALUE 12.34.
| ^~~~~~~~~~~~~~~~~~~~~~~~~
cobol1: error: failed compiling <source>
but has the expected result in GCC 15.2