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

مهدي شينون (Mehdi Chinoune) via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 3 04:03:35 PDT 2021


MehdiChinoune created this revision.
MehdiChinoune added reviewers: Flang, Meinersbur.
MehdiChinoune added a project: Flang.
Herald added a subscriber: jdoerfert.
MehdiChinoune requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99835

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: D99835.335080.patch
Type: text/x-patch
Size: 958 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210403/fcb4ee26/attachment.bin>


More information about the llvm-commits mailing list