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

36 lines
898 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
! Ensures that things that aren't procedures aren't allowed to be called.
module m
integer :: i
integer, pointer :: ip
type :: t
end type
type :: pdt(k,len)
integer, kind :: k
integer, len :: len
end type
type(pdt(1,2)) :: x
!ERROR: 'i' is not a variable
namelist /nml/i
contains
subroutine s(d)
real d
!ERROR: 'm' is not a callable procedure
call m
!ERROR: Cannot call function 'i' like a subroutine
call i
!ERROR: Cannot call function 'ip' like a subroutine
call ip
!ERROR: 't' is not a callable procedure
call t
!ERROR: 'k' is not a procedure
call x%k
!ERROR: 'len' is not a procedure
call x%len
!ERROR: Use of 'nml' as a procedure conflicts with its declaration
call nml
!ERROR: Cannot call function 'd' like a subroutine
call d
end subroutine
end