mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 02:06:06 +00:00

OpenMP Spec 5.0 [2.12.5, Restrictions]: If a device clause in which the ancestor device-modifier appears is present on the target construct, then a requires directive with the reverse_offload clause must be specified. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D118887
8 lines
412 B
C++
8 lines
412 B
C++
// RUN: %clang_cc1 -triple=x86_64 -verify -fopenmp -fopenmp-targets=x86_64 -x c++ -fexceptions -fcxx-exceptions %s
|
|
// RUN: %clang_cc1 -triple=x86_64 -verify -fopenmp-simd -fopenmp-targets=x86_64 -x c++ -fexceptions -fcxx-exceptions %s
|
|
|
|
void bar() {
|
|
#pragma omp target device(ancestor : 1) // expected-error {{Device clause with ancestor device-modifier used without specifying 'requires reverse_offload'}}
|
|
;
|
|
}
|