Files
RedBear-OS/local/recipes/dev/libclc/source/flang/test/Lower/module-generic-with-specific-mangling.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.3 KiB
Fortran

! RUN: split-file %s %t
! RUN: bbc -emit-fir %t/mangling_mod_a.f90 -o - | FileCheck %s --check-prefix=FIR
! RUN: bbc -emit-fir %t/mangling_mod_b.f90 -o - | FileCheck %s --check-prefix=MANGLE
! RUN: bbc -emit-fir %t/mangling_mod_c.f90 -o - | FileCheck %s --check-prefix=MANGLE
! RUN: bbc -emit-fir %t/mangling_mod_d.f90 -o - | FileCheck %s --check-prefix=MANGLE
! FIR: module
! MANGLE: func.func private @_QPmy_sub(!fir.ref<i32>)
!--- mangling_mod_a.f90
module mangling_mod_a
interface
subroutine my_sub(a)
integer :: a
end subroutine my_sub
end interface
! Generic interface
interface my_sub
procedure :: my_sub
end interface
contains
end module mangling_mod_a
!--- mangling_mod_b.f90
module mangling_mod_b
use mangling_mod_a
contains
subroutine my_sub2(a)
integer :: a
call my_sub(a)
end subroutine my_sub2
end module mangling_mod_b
!--- mangling_mod_c.f90
module mangling_mod_c
use mangling_mod_b
contains
subroutine my_sub3(a)
integer :: a
call my_sub(a)
end subroutine my_sub3
end module mangling_mod_c
!--- mangling_mod_d.f90
module mangling_mod_d
use mangling_mod_b
use mangling_mod_c
contains
subroutine my_sub4(a)
integer :: a
call my_sub(a)
end subroutine my_sub4
end module mangling_mod_d