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

61 lines
1.5 KiB
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
module m
interface foo
real function s1(x)
real x
end
!ERROR: 's2' is not a module procedure
module procedure s2
!ERROR: 's3' is not a procedure
procedure s3
!ERROR: Procedure 's1' is already specified in generic 'foo'
procedure s1
end interface
interface
real function s4(x,y)
real, intent(in) :: x,y
end function
complex function s2(x,y)
complex, intent(in) :: x,y
end function
end interface
generic :: bar => s4
generic :: bar => s2
!ERROR: Procedure 's4' is already specified in generic 'bar'
generic :: bar => s4
generic :: operator(.foo.)=> s4
generic :: operator(.foo.)=> s2
!ERROR: Procedure 's4' is already specified in generic 'OPERATOR(.foo.)'
generic :: operator(.foo.)=> s4
end module
module m2
interface
integer function f(x, y)
logical, intent(in) :: x, y
end function
end interface
generic :: operator(+)=> f
!ERROR: Procedure 'f' is already specified in generic 'OPERATOR(+)'
generic :: operator(+)=> f
end
module m3
interface operator(.ge.)
procedure f
end interface
interface operator(>=)
!ERROR: Procedure 'f' is already specified in generic 'OPERATOR(.GE.)'
procedure f
end interface
generic :: operator(>) => f
!ERROR: Procedure 'f' is already specified in generic 'OPERATOR(>)'
generic :: operator(.gt.) => f
contains
logical function f(x, y) result(result)
logical, intent(in) :: x, y
result = .true.
end
end