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

54 lines
1.2 KiB
Fortran

! This test verifies that both invocations produce a consistent order in the
! generated `.mod` file. Previous versions of Flang exhibited non-deterministic
! behavior due to iterating over a set ordered by heap pointers. This issue was
! particularly noticeable when using Flang as a library.
! RUN: rm -rf %t && mkdir -p %t
! RUN: %flang_fc1 \
! RUN: -fsyntax-only \
! RUN: -J%t \
! RUN: %S/Inputs/modfile73-a.f90 \
! RUN: %S/Inputs/modfile73-b.f90 \
! RUN: %S/Inputs/modfile73-c.f90
! RUN: %flang_fc1 -fsyntax-only -J%t %s
! RUN: cat %t/modfile73.mod | FileCheck %s
! RUN: rm -rf %t && mkdir -p %t
! RUN: %flang_fc1 \
! RUN: -fsyntax-only \
! RUN: -J%t \
! RUN: %S/Inputs/modfile73-a.f90 \
! RUN: %S/Inputs/modfile73-b.f90 \
! RUN: %S/Inputs/modfile73-c.f90 \
! RUN: %s
! RUN: cat %t/modfile73.mod | FileCheck %s
use modfile73ba
end
module modfile73
use modfile73bb
use modfile73c
CONTAINS
subroutine init_
end
subroutine delete_
end
subroutine assign_
end
function initialized_
end
function same_
end
function refcount_
end
function id_
end
function name_
end
subroutine tag_new_object
end
end
! CHECK: !need$ {{.*}} n modfile73bb
! CHECK-NEXT: !need$ {{.*}} n modfile73c