Files
RedBear-OS/local/recipes/dev/libclc/source/flang/test/Semantics/pointer02.f90
T
vasilito cb424d7448 build: static patch-sanity linter (shift-left the malformed-patch class)
verify-patch-sanity.py validates every active recipe .patch has internally-
consistent hunk line counts — catching the 'malformed patch at line N' failure
at commit/CI/preflight time instead of hours into a cook. This cycle hit that
class three times (qtwaylandscanner, sddm, xwayland), each only discovered when
cookbook tried to apply the patch.

Running it across the repo found 29 latent malformed patches (validated against
GNU patch: e.g. relibc/P3-sysv-ipc reproduces 'malformed patch at line 22').
They were harmless only because they sit in vendored recipes (baked, not re-
applied) — but would fail on any version-bump re-derivation. --fix recounts the
hunk headers (body untouched) and repaired all 29.

Wired into build-preflight.sh (Phase 1.0D) and redbear-ci.yml, with a unit test
(test-patch-sanity.sh). Skips archived/legacy trees and unvalidatable formats
(empty placeholders, bare-@@ git hunks).
2026-08-01 05:13:02 +03:00

54 lines
1.8 KiB
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
recursive subroutine sub(dp, dpp)
procedure(inner) dp
procedure(inner), pointer :: dpp
procedure(inner) ext
procedure(sub), pointer :: p1 => sub ! ok
procedure(inner), pointer :: p2 => ext ! ok
!ERROR: Procedure pointer 'p3' initializer 'inner' is neither an external nor a module procedure
procedure(inner), pointer :: p3 => inner
!ERROR: Procedure pointer 'p4' initializer 'dp' is neither an external nor a module procedure
procedure(inner), pointer :: p4 => dp
!ERROR: Procedure pointer 'p5' initializer 'dpp' is neither an external nor a module procedure
procedure(inner), pointer :: p5 => dpp
generic :: generic => ext
!ERROR: 'generic' must be an abstract interface or a procedure with an explicit interface
procedure(generic), pointer :: p6 ! => generic
contains
subroutine inner
end
end
recursive function fun() result(res)
procedure(fun), pointer :: p1 => fun ! ok
!ERROR: Procedure pointer 'p2' initializer 'inner' is neither an external nor a module procedure
procedure(inner), pointer :: p2 => inner
res = 0.
contains
function inner()
inner = 0.
end
end
module m
procedure(msub), pointer :: ps1 => msub ! ok
procedure(mfun), pointer :: pf1 => mfun ! ok
contains
recursive subroutine msub
procedure(msub), pointer :: ps2 => msub ! ok
!ERROR: Procedure pointer 'ps3' initializer 'inner' is neither an external nor a module procedure
procedure(inner), pointer :: ps3 => inner
contains
subroutine inner
end
end
recursive function mfun() result(res)
procedure(mfun), pointer :: pf2 => mfun ! ok
!ERROR: Procedure pointer 'pf3' initializer 'inner' is neither an external nor a module procedure
procedure(inner), pointer :: pf3 => inner
res = 0.
contains
function inner()
inner = 0.
end
end
end