GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
cobol

cobol: Fix EXIT PERFORM CYCLE statement generation

Correctly generates LABEL_EXPR for EXIT PERFORM CYCLE statements in COBOL.

A bug in the COBOL compiler’s genapi.cc has been fixed, addressing an issue where EXIT PERFORM CYCLE statements could generate a GOTO_EXPR without a corresponding LABEL_EXPR. This change ensures that the necessary label is created, resolving the incorrect control flow generation.

In Details

The COBOL front-end's genapi.cc incorrectly handled EXIT PERFORM CYCLE by emitting a GOTO_EXPR without a corresponding LABEL_EXPR in certain inlining scenarios, specifically within perform_inline_until. This commit modifies perform_inline_until to create the required testA.label when emitting such statements, thus fixing a potential control-flow error.

Filed Under: cobolcompiler bug