Skip to content

cobol_coverage: a GO TO into a paragraph that only RETURNs is a transfer of control #4621

Closed

Description

@squid-protocol

Part of #4270 (follow-up to #4602).

#4602's cobol_coverage.control_flow_unreachable treats a paragraph as never returning ("absorbing") only when it ends in GOBACK / STOP RUN / CICS RETURN / XCTL / ABEND or a PERFORM of another absorbing paragraph. In its strict pass a GO TO counts as a way out. That is conservative, but it misses a common CardDemo shape: CORPT00C's SEND-TRNRPT-SCREEN ends in GO TO RETURN-TO-CICS, a paragraph that does nothing but EXEC CICS RETURN.

Proposal: in the strict pass, a GO TO whose every target is itself an absorbing paragraph also ends the path. This is sound: control goes to a paragraph no path leaves. CORPT00C's PROCESS-ENTER-KEY 434 false, 445 false and SUBMIT-JOB-TO-INTRDR 476 false would then be control-flow facts. They are stated as G entries in tests/equivalence/infeasible_outcomes.json today, so those entries would come out. Look for the same SEND-then-GO TO pattern in the other COxxx programs. Write the failing test first, and include a GO TO into a paragraph that falls through.

Activity

  1. added
    bug
    legacy-modernization
    testing
    on Oct 8, 2026
  2. added
    scope:core
    era:2
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugera:2legacy-modernizationpriority: mediumscope:coretesting

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions