check_oracle Subroutine

public subroutine check_oracle(bound, proc)

Aborts if the C++ engine was selected without being bound.

Unreachable by construction, and kept anyway. The only way to clear dbg_fortran_engine is parquet_debug_use_fortran_sort_engine, which binds the pointers before it clears the flag -- so a build that can select the C++ engine has already imported the oracle. It must NEVER be softened into a silent fall back to the Fortran engine: the A/B conformance tests would then compare that engine against itself and pass, which is exactly the vacuous agreement they exist to rule out.

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: bound

whether the entry point is associated.

character(len=*), intent(in) :: proc

calling procedure, for the message.


Source Code

    subroutine check_oracle(bound, proc)
        logical, intent(in) :: bound          !! whether the entry point is associated.
        character(len=*), intent(in) :: proc  !! calling procedure, for the message.
        !
        ! gcov attribution artifact: the condition is evaluated on EVERY call (414 times in a
        ! full suite run) while the guarded body below is never reached, so this excluded
        ! line is expected to report a positive hit count and is not a stale exclusion. See
        ! CLAUDE.md's "Fortran gcov attribution artifacts".
        if (.not. bound) then ! GCOVR_EXCL_START -- unreachable; see the note above.
            error stop EP // proc // ": the C++ sort engine was selected but is not bound; " // &
                "add `use parquet_sorting_oracle` to the program that selects it"
        end if ! GCOVR_EXCL_STOP
    end subroutine check_oracle