[flang-commits] [flang] [Flang] Implement RENAME intrinsic (code-gen + runtime entry point) (PR #98359)
Michael Klemm via flang-commits
flang-commits at lists.llvm.org
Thu Jul 11 06:09:17 PDT 2024
================
@@ -67,7 +68,13 @@ void RTDECL(Rename)(const Descriptor &path1, const Descriptor &path2,
// We simply call rename(2) from POSIX
int result = rename(pathSrc, pathDst);
if (status) {
- StoreIntToDescriptor(status, result, terminator);
+ // When an error has happened,
+ int errorCode = 0; // Assume success
+ if (result < 0) {
----------------
mjklemm wrote:
Good catch! I have changed that. Windows effectively reports -1 (which is in line with the docs :-)), but I have made it such that it works in any case.
https://github.com/llvm/llvm-project/pull/98359
More information about the flang-commits
mailing list