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

35 lines
991 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
type :: t1
sequence
integer :: m = 123
integer :: pad
end type
type :: t2
sequence
integer :: n = 123
integer :: pad
end type
type :: t3
sequence
integer :: k = 234
integer :: pad
end type
!ERROR: Distinct default component initializations of equivalenced objects affect 'x1a%m' more than once
type(t1) :: x1a
!ERROR: Distinct default component initializations of equivalenced objects affect 'x2a%n' more than once
type(t2) :: x2a
!ERROR: Distinct default component initializations of equivalenced objects affect 'x3%k' more than once
type(t3), save :: x3
!ERROR: Explicit initializations of equivalenced objects affect 'ja(2_8)' more than once
!ERROR: Explicit initializations of equivalenced objects affect 'ka(1_8)' more than once
integer :: ja(2), ka(2)
data ja/345, 456/
data ka/456, 567/
equivalence(x1a, x2a, x3)
! Same value: no error
type(t1) :: x1b
type(t2) :: x2b
equivalence(x1b, x2b)
equivalence(ja(2),ka(1))
end