
This reverts commit f2583f3acf596cc545c8c0e3cb28e712f4ebf21b. There is a large body of non-conforming C-like code using format strings like this: #define PRIuS "zu" void h(size_t foo, size_t bar) { printf("foo is %"PRIuS", bar is %"PRIuS, foo, bar); } Rejecting this code would be very disruptive. We could decide to do that, but it's sufficiently disruptive that I think it requires gathering more community consensus with an RFC, and Aaron indicated [1] it's OK to revert for now so continuous testing systems can see past this issue while we decide what to do. [1] https://reviews.llvm.org/D153156#4607717
28 lines
655 B
C++
28 lines
655 B
C++
// REQUIRES: amdgpu-registered-target
|
|
|
|
// RUN: %clang_cc1 -triple x86_64-mingw64 -emit-llvm-bc -target-cpu x86-64 -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -o %t.bc -x c++ %s
|
|
// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple x86_64-mingw64 -fsyntax-only -target-cpu gfx900 -fopenmp -fopenmp-is-target-device -fopenmp-host-ir-file-path %t.bc -x c++ %s
|
|
// expected-no-diagnostics
|
|
|
|
void print(double);
|
|
|
|
constexpr double operator"" _X (long double a)
|
|
{
|
|
return (double)a;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
auto a = 1._X;
|
|
print(a);
|
|
#pragma omp target map(tofrom: a)
|
|
{
|
|
#pragma omp teams num_teams(1) thread_limit(4)
|
|
{
|
|
a += 1._X;
|
|
}
|
|
}
|
|
print(a);
|
|
return 0;
|
|
}
|