[llvm-branch-commits] [test-suite] r325565 - Merging r325231:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Feb 20 01:18:05 PST 2018


Author: hans
Date: Tue Feb 20 01:18:05 2018
New Revision: 325565

URL: http://llvm.org/viewvc/llvm-project?rev=325565&view=rev
Log:
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

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

Modified:
    test-suite/branches/release_60/   (props changed)
    test-suite/branches/release_60/MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/clamr_cpuonly.cpp

Propchange: test-suite/branches/release_60/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 20 01:18:05 2018
@@ -1 +1 @@
-/test-suite/trunk:324848
+/test-suite/trunk:324848,325231

Modified: test-suite/branches/release_60/MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/clamr_cpuonly.cpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/branches/release_60/MultiSource/Benchmarks/DOE-ProxyApps-C%2B%2B/CLAMR/clamr_cpuonly.cpp?rev=325565&r1=325564&r2=325565&view=diff
==============================================================================
--- test-suite/branches/release_60/MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/clamr_cpuonly.cpp (original)
+++ test-suite/branches/release_60/MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/clamr_cpuonly.cpp Tue Feb 20 01:18:05 2018
@@ -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 @@ extern "C" void do_calc(void)
 
    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;
    }




More information about the llvm-branch-commits mailing list