This is an archive of the discontinued LLVM Phabricator instance.

[flang][msvc] Fix compilation of external-hello-world test with MSVC.
ClosedPublic

Authored by MehdiChinoune on Feb 4 2021, 11:32 AM.

Details

Summary

MSVC doesn't accept division by zero.

Diff Detail

Event Timeline

ChinouneMehdi created this revision.Feb 4 2021, 11:32 AM
ChinouneMehdi requested review of this revision.Feb 4 2021, 11:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 4 2021, 11:32 AM
ChinouneMehdi retitled this revision from [flang][msvc] Fix compilation of external-hello-world with MSVC. to [flang][msvc] Fix compilation of external-hello-world test with MSVC..Feb 4 2021, 11:33 AM

Division by zero is undefined behavior. I think this should use ,std::numeric_limits<double>::infinity() and std::numeric_limits<double>::quiet_NaN() (or the C macros INFINITY / NAN)

Cold you please make the change I requested?

MehdiChinoune commandeered this revision.Apr 4 2021, 7:16 AM
MehdiChinoune updated this revision to Diff 335144.
MehdiChinoune added a reviewer: ChinouneMehdi.
Meinersbur accepted this revision.Apr 13 2021, 11:51 PM

Sorry for the wait. Patch LGTM.

Would you like me to push it top main?

This revision is now accepted and ready to land.Apr 13 2021, 11:51 PM

Sorry for the wait. Patch LGTM.

Would you like me to push it top main?

Yes, of course.
Thanks