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

76 lines
2.0 KiB
Fortran

! RUN: bbc -emit-fir %s -o - | FileCheck %s
! Tests the generation of fir.type_info operations.
module polymorphic_types
type p1
integer :: a
integer :: b
contains
procedure :: proc1 => proc1_p1
procedure :: aproc
procedure :: zproc
end type
type, extends(p1) :: p2
integer :: c
contains
procedure :: proc1 => proc1_p2
procedure :: aproc2
end type
type, extends(p2) :: p3
integer :: d
contains
procedure :: aproc3
end type
contains
subroutine proc1_p1(p)
class(p1) :: p
end subroutine
subroutine aproc(p)
class(p1) :: p
end subroutine
subroutine zproc(p)
class(p1) :: p
end subroutine
subroutine proc1_p2(p)
class(p2) :: p
end subroutine
subroutine aproc2(p)
class(p2) :: p
end subroutine
subroutine aproc3(p)
class(p3) :: p
end subroutine
end module
! CHECK-LABEL: fir.type_info @_QMpolymorphic_typesTp1
! CHECK: fir.dt_entry "aproc", @_QMpolymorphic_typesPaproc
! CHECK: fir.dt_entry "proc1", @_QMpolymorphic_typesPproc1_p1
! CHECK: fir.dt_entry "zproc", @_QMpolymorphic_typesPzproc
! CHECK: }
! CHECK-LABEL: fir.type_info @_QMpolymorphic_typesTp2 {{.*}}extends !fir.type<_QMpolymorphic_typesTp1{{.*}}>
! CHECK: fir.dt_entry "aproc", @_QMpolymorphic_typesPaproc
! CHECK: fir.dt_entry "proc1", @_QMpolymorphic_typesPproc1_p2
! CHECK: fir.dt_entry "zproc", @_QMpolymorphic_typesPzproc
! CHECK: fir.dt_entry "aproc2", @_QMpolymorphic_typesPaproc2
! CHECK: }
! CHECK-LABEL: fir.type_info @_QMpolymorphic_typesTp3 {{.*}}extends !fir.type<_QMpolymorphic_typesTp2{{.*}}>
! CHECK: fir.dt_entry "aproc", @_QMpolymorphic_typesPaproc
! CHECK: fir.dt_entry "proc1", @_QMpolymorphic_typesPproc1_p2
! CHECK: fir.dt_entry "zproc", @_QMpolymorphic_typesPzproc
! CHECK: fir.dt_entry "aproc2", @_QMpolymorphic_typesPaproc2
! CHECK: fir.dt_entry "aproc3", @_QMpolymorphic_typesPaproc3
! CHECK: }