cb424d7448
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).
60 lines
2.0 KiB
Fortran
60 lines
2.0 KiB
Fortran
! RUN: %python %S/test_errors.py %s %flang_fc1
|
|
module m
|
|
|
|
! For C1543
|
|
interface intFace
|
|
!WARNING: Attribute 'MODULE' cannot be used more than once [-Wredundant-attribute]
|
|
module pure module real function moduleFunc()
|
|
end function moduleFunc
|
|
end interface
|
|
|
|
contains
|
|
|
|
! C1543 A prefix shall contain at most one of each prefix-spec.
|
|
!
|
|
! R1535 subroutine-stmt is
|
|
! [prefix] SUBROUTINE subroutine-name [ ( [dummy-arg-list] )
|
|
! [proc-language-binding-spec] ]
|
|
!
|
|
! R1526 prefix is
|
|
! prefix-spec[prefix-spec]...
|
|
!
|
|
! prefix-spec values are:
|
|
! declaration-type-spec, ELEMENTAL, IMPURE, MODULE, NON_RECURSIVE,
|
|
! PURE, RECURSIVE
|
|
|
|
!ERROR: FUNCTION prefix cannot specify the type more than once
|
|
real pure real function realFunc()
|
|
end function realFunc
|
|
|
|
!WARNING: Attribute 'ELEMENTAL' cannot be used more than once [-Wredundant-attribute]
|
|
elemental real elemental function elementalFunc(x)
|
|
real, value :: x
|
|
elementalFunc = x
|
|
end function elementalFunc
|
|
|
|
!WARNING: Attribute 'IMPURE' cannot be used more than once [-Wredundant-attribute]
|
|
impure real impure function impureFunc()
|
|
end function impureFunc
|
|
|
|
!WARNING: Attribute 'PURE' cannot be used more than once [-Wredundant-attribute]
|
|
pure real pure function pureFunc()
|
|
end function pureFunc
|
|
|
|
!ERROR: Attributes 'PURE' and 'IMPURE' conflict with each other
|
|
impure real pure function impurePureFunc()
|
|
end function impurePureFunc
|
|
|
|
!WARNING: Attribute 'RECURSIVE' cannot be used more than once [-Wredundant-attribute]
|
|
recursive real recursive function recursiveFunc()
|
|
end function recursiveFunc
|
|
|
|
!WARNING: Attribute 'NON_RECURSIVE' cannot be used more than once [-Wredundant-attribute]
|
|
non_recursive real non_recursive function non_recursiveFunc()
|
|
end function non_recursiveFunc
|
|
|
|
!ERROR: Attributes 'RECURSIVE' and 'NON_RECURSIVE' conflict with each other
|
|
non_recursive real recursive function non_recursiveRecursiveFunc()
|
|
end function non_recursiveRecursiveFunc
|
|
end module m
|