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

47 lines
980 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
module m
type t1
contains
procedure, pass(from) :: defAsst1
generic :: assignment(=) => defAsst1
end type
type t2
end type
type t3
end type
interface assignment(=)
module procedure defAsst2
end interface
contains
subroutine defAsst1(to,from)
class(*), intent(out) :: to
class(t1), intent(in) :: from
end
subroutine defAsst2(to,from)
class(*), intent(out) :: to
class(t2), intent(in) :: from
end
end
program test
use m
type(t1) x1
type(t2) x2
type(t3) x3
j = x1
j = x2
!ERROR: No intrinsic or user-defined ASSIGNMENT(=) matches operand types INTEGER(4) and TYPE(t3)
j = x3
x1 = x1
x1 = x2
!ERROR: No intrinsic or user-defined ASSIGNMENT(=) matches operand types TYPE(t1) and TYPE(t3)
x1 = x3
x2 = x1
x2 = x2
!ERROR: No intrinsic or user-defined ASSIGNMENT(=) matches operand types TYPE(t2) and TYPE(t3)
x2 = x3
x3 = x1
x3 = x2
x3 = x3
end