https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119771
Bug ID: 119771 Summary: FE (parser): CONSTANT AS LENGTH OF <undefined> does not error - but result in length of zero 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: --- To reproduce: IDENTIFICATION DIVISION. PROGRAM-ID. Usage-Lengths. DATA DIVISION. WORKING-STORAGE SECTION. 01 BANANA CONSTANT AS LENGTH OF BANANA. PROCEDURE DIVISION. DISPLAY BANANA goback. No error during compile (should error because of self-reference, when using LENGTH OF BANANA2 instead it should error because of missing data-item). Result: 0