Files
clang-p2996/openmp/runtime/test/transform/reverse/intfor.c
Michael Kruse 80865c01e1 [Clang][OpenMP] Add reverse directive (#92916)
Add the reverse directive which will be introduced in the upcoming
OpenMP 6.0 specification. A preview has been published in [Technical
Report 12](https://www.openmp.org/wp-content/uploads/openmp-TR12.pdf).

---------

Co-authored-by: Alexey Bataev <a.bataev@outlook.com>
2024-07-18 10:35:32 +02:00

26 lines
432 B
C

// RUN: %libomp-compile-and-run | FileCheck %s --match-full-lines
#ifndef HEADER
#define HEADER
#include <stdlib.h>
#include <stdio.h>
int main() {
printf("do\n");
#pragma omp reverse
for (int i = 7; i < 19; i += 3)
printf("i=%d\n", i);
printf("done\n");
return EXIT_SUCCESS;
}
#endif /* HEADER */
// CHECK: do
// CHECK-NEXT: i=16
// CHECK-NEXT: i=13
// CHECK-NEXT: i=10
// CHECK-NEXT: i=7
// CHECK-NEXT: done