Merging r325231:
------------------------------------------------------------------------
r325231 | sdardis | 2018-02-15 12:38:39 +0100 (Thu, 15 Feb 2018) | 13 lines

[test-suite] Fix ambigous call to overloaded function isnan

Reviewers: hfinkel, MatzeB

Older versions of glibc expose isnan as C99 macros and C++ functions, causing
a compilation failure of the CLAMR benchmark. Address this by explicitly calling
the c++ version of this function.

For reference: https://sourceware.org/bugzilla/show_bug.cgi?id=19439,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48891

Differential Revision: https://reviews.llvm.org/D42411

------------------------------------------------------------------------

llvm-svn: 325565
diff --git a/MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/clamr_cpuonly.cpp b/MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/clamr_cpuonly.cpp
index e3e5af0..ced2fe4 100644
--- a/MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/clamr_cpuonly.cpp
+++ b/MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/clamr_cpuonly.cpp
@@ -55,7 +55,7 @@
  */
 
 #include <algorithm>
-#include <math.h>
+#include <cmath>
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/time.h>
@@ -499,7 +499,7 @@
 
    int error_status = STATUS_OK;
 
-   if (isnan(H_sum)) {
+   if (std::isnan(H_sum)) {
       printf("Got a NAN on cycle %d\n",ncycle);
       error_status = STATUS_NAN;
    }