brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 19ceee5 Raw
25 lines · c
1// RUN: %clang_cc1 -verify -fopenmp -triple x86_64-unknown-unknown %s2// RUN: %clang_cc1 -verify -fopenmp-simd -triple x86_64-unknown-unknown %s3// RUN: %clang_cc1 -verify -fopenmp -triple x86_64-unknown-unknown -fopenmp-targets=nvptx64 %s4 5void foo() {6}7 8void bar() {9#pragma omp target ompx_bare // expected-error {{unexpected OpenMP clause 'ompx_bare' in directive '#pragma omp target'}} expected-note {{OpenMP extension clause 'ompx_bare' only allowed with '#pragma omp target teams'}}10  foo();11 12#pragma omp target teams distribute ompx_bare // expected-error {{unexpected OpenMP clause 'ompx_bare' in directive '#pragma omp target teams distribute'}} expected-note {{OpenMP extension clause 'ompx_bare' only allowed with '#pragma omp target teams'}}13  for (int i = 0; i < 10; ++i) {}14 15#pragma omp target teams distribute parallel for ompx_bare // expected-error {{unexpected OpenMP clause 'ompx_bare' in directive '#pragma omp target teams distribute parallel for'}} expected-note {{OpenMP extension clause 'ompx_bare' only allowed with '#pragma omp target teams'}}16  for (int i = 0; i < 10; ++i) {}17 18#pragma omp target19#pragma omp teams ompx_bare // expected-error {{unexpected OpenMP clause 'ompx_bare' in directive '#pragma omp teams'}} expected-note {{OpenMP extension clause 'ompx_bare' only allowed with '#pragma omp target teams'}}20  foo();21 22#pragma omp target teams ompx_bare // expected-error {{'ompx_bare' clauses requires explicit grid size via 'num_teams' and 'thread_limit' clauses}}23  foo();24}25