Files
RedBear-OS/local/recipes/dev/libclc/source/flang/test/Semantics/bind-c12.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

71 lines
1.6 KiB
Fortran

!RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic -Werror
!PORTABILITY: An interoperable procedure should have an interface
subroutine subr1(e) bind(c)
external e
end
subroutine subr2(p) bind(c)
!PORTABILITY: An interoperable procedure should have an interface
procedure() :: p
end
subroutine subr3(p) bind(c)
!PORTABILITY: An interoperable procedure should have an interface
procedure(real) :: p
end
subroutine subr4(p) bind(c)
interface
!PORTABILITY: A dummy procedure of an interoperable procedure should be BIND(C)
subroutine p(n)
integer, intent(in) :: n
end
end interface
end
subroutine subr5(p) bind(c)
interface
!WARNING: A dummy procedure of an interoperable procedure should be BIND(C)
subroutine p(c)
character(*), intent(in) :: c
end
end interface
end
subroutine subr6(p) bind(c)
interface
function p()
!ERROR: Interoperable function result must be scalar
real p(1)
end
end interface
end
subroutine subr7(p) bind(c)
interface
!ERROR: Interoperable character function result must have length one
character(*) function p()
end
end interface
end
subroutine subr8(p) bind(c)
interface
!WARNING: A dummy procedure of an interoperable procedure should be BIND(C)
subroutine p(n)
integer, intent(in), value :: n
end
end interface
end
subroutine subr9(p) bind(c)
!ERROR: An interface name with the BIND attribute must appear if the BIND attribute appears in a procedure declaration
procedure(q), bind(c), pointer :: p
interface
function q()
real q(1)
end
end interface
end