[PATCH] D96069: [flang][msvc] Fix compilation of external-hello-world test with MSVC.

مهدي شينون (Mehdi Chinoune) via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 4 07:17:38 PDT 2021


MehdiChinoune updated this revision to Diff 335144.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96069/new/

https://reviews.llvm.org/D96069

Files:
  flang/unittests/Runtime/external-hello.cpp


Index: flang/unittests/Runtime/external-hello.cpp
===================================================================
--- flang/unittests/Runtime/external-hello.cpp
+++ flang/unittests/Runtime/external-hello.cpp
@@ -2,6 +2,7 @@
 #include "../../runtime/main.h"
 #include "../../runtime/stop.h"
 #include <cstring>
+#include <limits>
 
 using namespace Fortran::runtime::io;
 
@@ -13,9 +14,9 @@
   IONAME(OutputReal64)(io, 0.0);
   IONAME(OutputReal64)(io, 2.0 / 3.0);
   IONAME(OutputReal64)(io, 1.0e99);
-  IONAME(OutputReal64)(io, 1.0 / 0.0);
-  IONAME(OutputReal64)(io, -1.0 / 0.0);
-  IONAME(OutputReal64)(io, 0.0 / 0.0);
+  IONAME(OutputReal64)(io, std::numeric_limits<double>::infinity());
+  IONAME(OutputReal64)(io, -std::numeric_limits<double>::infinity());
+  IONAME(OutputReal64)(io, std::numeric_limits<double>::quiet_NaN());
   IONAME(OutputComplex64)(io, 123.0, -234.0);
   IONAME(OutputLogical)(io, false);
   IONAME(OutputLogical)(io, true);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96069.335144.patch
Type: text/x-patch
Size: 958 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210404/57a93e7b/attachment.bin>


More information about the llvm-commits mailing list