LLVM OpenMP
reverse-inner.c
Go to the documentation of this file.
1// RUN: %libomp-compile -fopenmp-version=61 && %libomp-run \
2// RUN: | FileCheck %s --match-full-lines
3
4// A loop transformation consumed by flatten: the variable of the transformed
5// loop must hold its loop-exit value after the construct, as without the
6// directive.
7
8#ifndef HEADER
9#define HEADER
10
11#include <stdio.h>
12#include <stdlib.h>
13
14int main(void) {
15 int i = -1, j = -1;
16#pragma omp flatten
17 for (i = 0; i < 4; i++)
18#pragma omp reverse
19 for (j = 0; j < 5; j++)
20 ;
21 printf("flatten_reverse_inner: i=%d j=%d\n", i, j);
22 return EXIT_SUCCESS;
23}
24#endif
25
26// CHECK: flatten_reverse_inner: i=4 j=5
#define i
Definition kmp_stub.cpp:88
int main(void)