
This was committed as ec6c847179fd, but then reverted after a failure in: https://lab.llvm.org/buildbot/#/builders/84/builds/13983 I was not able to reproduce the problem, but I added an extra check for a NULL QualType just in case. Original comit message: The patch adds missing diagnostics for cases like: float F3 = ((__float128)F1 * (__float128)F2) / 2.0f; Sema::checkDeviceDecl (renamed to checkTypeSupport) is changed to work with a type without the corresponding ValueDecl. It is also refactored so that host diagnostics for unsupported types can be added here as well. Differential Revision: https://reviews.llvm.org/D109315
16 lines
611 B
C
16 lines
611 B
C
// RUN: %clang_cc1 -triple powerpc64le -emit-llvm-bc -fopenmp %s \
|
|
// RUN: -fopenmp-targets=powerpc64le,x86_64 -o %t-ppc-host.bc
|
|
// RUN: %clang_cc1 -verify -triple x86_64 -aux-triple powerpc64le -fopenmp \
|
|
// RUN: -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc %s \
|
|
// RUN: -fsyntax-only
|
|
|
|
void foo(__ibm128 x); // expected-note {{'foo' defined here}}
|
|
|
|
void loop(int n, __ibm128 *arr) {
|
|
#pragma omp target parallel
|
|
for (int i = 0; i < n; ++i) {
|
|
// expected-error@+1 {{'foo' requires 128 bit size '__ibm128' type support, but target 'x86_64' does not support it}}
|
|
foo(arr[i]);
|
|
}
|
|
}
|