summaryrefslogtreecommitdiff
path: root/test/Headers/nvptx_device_cmath_functions_cxx17.cpp
diff options
context:
space:
mode:
authorGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2019-05-15 20:28:23 +0000
committerGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2019-05-15 20:28:23 +0000
commit5e0c1d04180d1b561dc9b6a6508cf3ef1b3fefce (patch)
treeea5c8c672863b8f8b9218bf1e9367c62b9152990 /test/Headers/nvptx_device_cmath_functions_cxx17.cpp
parentc9cbda2fe6e655f3db9e11e56b92fcb9ed83c97e (diff)
downloadclang-5e0c1d04180d1b561dc9b6a6508cf3ef1b3fefce.tar.gz
[OpenMP][Bugfix] Move double and float versions of abs under c++ macro
Summary: This is a fix for the reported bug: [[ https://bugs.llvm.org/show_bug.cgi?id=41861 | 41861 ]] abs functions need to be moved under the c++ macro to avoid conflicts with included headers. Reviewers: tra, jdoerfert, hfinkel, ABataev, caomhin Reviewed By: jdoerfert Subscribers: guansong, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61959 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@360809 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Headers/nvptx_device_cmath_functions_cxx17.cpp')
-rw-r--r--test/Headers/nvptx_device_cmath_functions_cxx17.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Headers/nvptx_device_cmath_functions_cxx17.cpp b/test/Headers/nvptx_device_cmath_functions_cxx17.cpp
index 89b997aba3..0b715fea01 100644
--- a/test/Headers/nvptx_device_cmath_functions_cxx17.cpp
+++ b/test/Headers/nvptx_device_cmath_functions_cxx17.cpp
@@ -18,5 +18,9 @@ void test_sqrt(double a1) {
double l2 = pow(a1, a1);
// CHECK-YES: call double @__nv_modf(double
double l3 = modf(a1 + 3.5, &a1);
+ // CHECK-YES: call double @__nv_fabs(double
+ double l4 = fabs(a1);
+ // CHECK-YES: call i32 @__nv_abs(i32
+ double l5 = abs((int)a1);
}
}