Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / OpenMP / begin_declare_variant_range_withouth_end.c
blobbbd8b473914d721740478e84329e842328be4b78
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
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;
11 #pragma omp begin declare variant match(device={kind(gpu)})
12 int also_after(void) {
13 return 2;
15 int also_before(void) {
16 return 2;
18 #pragma omp end declare variant
21 #pragma omp begin declare variant match(device={kind(fpga)})
23 This text is never parsed!
25 #pragma omp end declare variant
27 int also_after(void) {
28 return 0;
31 int test(void) {
32 return also_after() + also_before();