Skip to content

COBOL: PERFORM x(i) TIMES with a subscripted count is recorded as a call to paragraph x #5637

Closed

Description

@squid-protocol

Problem

PERFORM identifier TIMES uses a data item as a repeat count; there is no paragraph target. With a plain identifier the engine gets it right; with a subscripted identifier it records a call to a paragraph of that name:

      * our own minimal example
           PERFORM WS-COUNT(WS-SLOT) TIMES
               ADD 1 TO WS-TOTAL
           END-PERFORM

-> calls_out_to contains WS-COUNT. Seen once in an internal GnuCOBOL sample (free format); the plain form (PERFORM rem-n TIMES, four cases in the same program) is correct.

Context: the COBOL call oracle on the licensed COBOL DOOM ports (FPS.cob, agentic-cobol-doom-cc/-codex, mood's COBOL AI) finds PERFORM/GO TO/CALL extraction at recall 1.000 and precision ~1.000; this is the only false-edge shape found.

Acceptance

  • PERFORM <identifier>[(subscripts)] TIMES, PERFORM <literal> TIMES, PERFORM VARYING/UNTIL never produce a paragraph call; tests in fixed and free format.

Found by the DOOM corpus call-graph checks (#5630, #5457).

🤖 Generated with Claude Code

Activity

  1. added
    bug
    metrics
    core-engine
    priority: low
    scope:core
    needs:doom-corpus
    on Oct 19, 2026
  2. squid-protocol commented on Oct 19, 2026

    @squid-protocol
    OwnerAuthor

    Claimed by promoter-bot host nyx, lease renewed 2026-10-19T19:01Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove the claim:nyx label.

  3. added a commit that references this issue on Oct 19, 2026
    48c2efa
  4. added a commit that references this issue on Oct 19, 2026
    7c8725a
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

    bugclaim:nyxcore-enginemetricsneeds:doom-corpuspriority: lowscope:core

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions