| 1 |
// RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp -x c -std=c99 -fms-extensions -Wno-pragma-pack %s |
| 2 |
// RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp-simd -x c -std=c99 -fms-extensions -Wno-pragma-pack %s |
| 3 |
|
| 4 |
// TODO: Issue an eror message as the end is missing |
| 5 |
// expected-no-diagnostics |
| 6 |
#pragma omp begin declare variant match(device={kind(cpu)}) |
| 7 |
int also_before(void) { |
| 8 |
return 0; |
| 9 |
} |
| 10 |
|
| 11 |
#pragma omp begin declare variant match(device={kind(gpu)}) |
| 12 |
int also_after(void) { |
| 13 |
return 2; |
| 14 |
} |
| 15 |
int also_before(void) { |
| 16 |
return 2; |
| 17 |
} |
| 18 |
#pragma omp end declare variant |
| 19 |
|
| 20 |
|
| 21 |
#pragma omp begin declare variant match(device={kind(fpga)}) |
| 22 |
|
| 23 |
This text is never parsed! |
| 24 |
|
| 25 |
#pragma omp end declare variant |
| 26 |
|
| 27 |
int also_after(void) { |
| 28 |
return 0; |
| 29 |
} |
| 30 |
|
| 31 |
int test(void) { |
| 32 |
return also_after() + also_before(); |
| 33 |
} |