Skip to content

Forge reachability: an exhaustive EVALUATE whose every branch transfers does not fall through #3510

Closed

Description

@squid-protocol

Found by the blind census while pinning CICS GENAPP (#3489).

Problem

In base/src/lgtestp4.cbl, paragraph NO-ADD is a single EVALUATE CA-RETURN-CODE:

  • WHEN 70 ends in Go To ERROR-OUT;
  • WHEN OTHER also ends in Go To ERROR-OUT.

So control never falls through into the next paragraph, NO-UPD. Nothing PERFORMs or GO TOs NO-UPD, which makes it dead. The forge's reachability (x_ray_dead_code) treats any EVALUATE as able to fall through, so it reports NO-UPD as reachable.

The answer key's reader had the same blind spot. It is fixed there (_evaluate_is_terminal: an EVALUATE with WHEN OTHER whose every branch ends in an unconditional transfer is terminal), and the key now marks NO-UPD dead.

Ledger

cics-genapp :: forge | dead | … | NO-UPD | fn and the non-trivial twin, recorded under the cause forge_exhaustive_evaluate_falls_through.

🤖 Generated with Claude Code

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

    scope:core

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions