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).
102 lines
2.9 KiB
Fortran
102 lines
2.9 KiB
Fortran
! REQUIRES: plugins, examples, shell
|
|
|
|
!RUN: %flang_fc1 -load %llvmshlibdir/flangOmpReport.so -plugin flang-omp-report -fopenmp %s -o - | FileCheck %s
|
|
|
|
! Check OpenMP clause validity for the following directives:
|
|
! 2.10 Device constructs
|
|
program main
|
|
|
|
real(8) :: arrayA(256), arrayB(256)
|
|
integer :: N
|
|
|
|
arrayA = 1.414
|
|
arrayB = 3.14
|
|
N = 256
|
|
|
|
!$omp target map(arrayA)
|
|
do i = 1, N
|
|
a = 3.14
|
|
enddo
|
|
!$omp end target
|
|
|
|
!$omp target device(0)
|
|
do i = 1, N
|
|
a = 3.14
|
|
enddo
|
|
!$omp end target
|
|
|
|
!$omp target defaultmap(tofrom:scalar)
|
|
do i = 1, N
|
|
a = 3.14
|
|
enddo
|
|
!$omp end target
|
|
|
|
!$omp teams num_teams(3) thread_limit(10) default(shared) private(i) shared(a)
|
|
do i = 1, N
|
|
a = 3.14
|
|
enddo
|
|
!$omp end teams
|
|
|
|
!$omp target map(tofrom:a)
|
|
do i = 1, N
|
|
a = 3.14
|
|
enddo
|
|
!$omp end target
|
|
|
|
!$omp target data device(0) map(to:a)
|
|
do i = 1, N
|
|
a = 3.14
|
|
enddo
|
|
!$omp end target data
|
|
|
|
end program main
|
|
|
|
! CHECK: ---
|
|
! CHECK-NEXT: - file: '{{[^"]*}}omp-device-constructs.f90'
|
|
! CHECK-NEXT: line: 16
|
|
! CHECK-NEXT: construct: target
|
|
! CHECK-NEXT: clauses:
|
|
! CHECK-NEXT: - clause: map
|
|
! CHECK-NEXT: details: arraya
|
|
! CHECK-NEXT: - file: '{{[^"]*}}omp-device-constructs.f90'
|
|
! CHECK-NEXT: line: 22
|
|
! CHECK-NEXT: construct: target
|
|
! CHECK-NEXT: clauses:
|
|
! CHECK-NEXT: - clause: device
|
|
! CHECK-NEXT: details: '0'
|
|
! CHECK-NEXT: - file: '{{[^"]*}}omp-device-constructs.f90'
|
|
! CHECK-NEXT: line: 28
|
|
! CHECK-NEXT: construct: target
|
|
! CHECK-NEXT: clauses:
|
|
! CHECK-NEXT: - clause: defaultmap
|
|
! CHECK-NEXT: details: 'tofrom:scalar'
|
|
! CHECK-NEXT: - file: '{{[^"]*}}omp-device-constructs.f90'
|
|
! CHECK-NEXT: line: 34
|
|
! CHECK-NEXT: construct: teams
|
|
! CHECK-NEXT: clauses:
|
|
! CHECK-NEXT: - clause: default
|
|
! CHECK-NEXT: details: shared
|
|
! CHECK-NEXT: - clause: num_teams
|
|
! CHECK-NEXT: details: '3'
|
|
! CHECK-NEXT: - clause: private
|
|
! CHECK-NEXT: details: i
|
|
! CHECK-NEXT: - clause: shared
|
|
! CHECK-NEXT: details: a
|
|
! CHECK-NEXT: - clause: thread_limit
|
|
! CHECK-NEXT: details: '10'
|
|
! CHECK-NEXT: - file: '{{[^"]*}}omp-device-constructs.f90'
|
|
! CHECK-NEXT: line: 40
|
|
! CHECK-NEXT: construct: target
|
|
! CHECK-NEXT: clauses:
|
|
! CHECK-NEXT: - clause: map
|
|
! CHECK-NEXT: details: 'tofrom:a'
|
|
! CHECK-NEXT: - file: '{{[^"]*}}omp-device-constructs.f90'
|
|
! CHECK-NEXT: line: 46
|
|
! CHECK-NEXT: construct: target data
|
|
! CHECK-NEXT: clauses:
|
|
! CHECK-NEXT: - clause: device
|
|
! CHECK-NEXT: details: '0'
|
|
! CHECK-NEXT: - clause: map
|
|
! CHECK-NEXT: details: 'to:a'
|
|
! CHECK-NEXT: ...
|