Skip to content

A local parameter initialized from a use-imported constant is emitted as a bare name #28

Description

@chenyueqi

numfor's `sorting.f90` (corpus) declares, inside `searchsorted_dp` and its siblings, `real(dp), parameter :: Delta = Small` with `Small` use-imported from `basic`. The emitted body reads `delta = SMALL`, a bare name the module never defines -- the companion is imported as `_basic` and the constant lives there (or should be resolved into the use-constants file). The line is the same on `main`; it was never exercised because the three routines are private specifics of the public generic `searchsorted`, which the flat oracle now gates (#17). The bit-exact gate reports `candidate raised: NameError: name 'SMALL' is not defined` on three of the four specifics.

Found 2026-09-03 re-running the corpus on the CLUBB branches.

Activity

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

    area:emitterthe NumPy translation (statements, expressions, parameters)bugSomething isn't workingfound-by:clubbsurfaced by the recast-clubb extension on CLUBB_core

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions