[flang-commits] [PATCH] D118777: [flang] Add runtime support for GET_COMMAND

Diana Picus via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Mar 3 23:03:16 PST 2022


rovka added inline comments.


================
Comment at: flang/unittests/Runtime/CommandTest.cpp:396
+  EXPECT_EQ(0, RTNAME(GetCommand)(nullptr, length.get(), nullptr));
+  CheckDescriptorEqInt(length.get(), 51);
+}
----------------
jeanPerier wrote:
> This test seems to fail on windows, see the build bot:
> 
> ```
> Note: Google Test filter = OnlyValidArguments.GetCommandShortLength
> [==========] Running 1 test from 1 test suite.
> [----------] Global test environment set-up.
> [----------] 1 test from OnlyValidArguments
> [ RUN      ] OnlyValidArguments.GetCommandShortLength
> C:\ws\w2\llvm-project\premerge-checks\flang\unittests\Runtime\CommandTest.cpp(77): error: Expected equality of these values:
>   *value->OffsetElement<std::int64_t>()
>     Which is: 8589934643
>   expected
>     Which is: 51
> ```
> 
> I think the `value->OffsetElement<std::int64_t>()` in `CheckDescriptorEqInt` may be undefined behavior if the integer type in `value` is not an `std::int64_t`  (like here where it is a short).
Oops, I thought I had looked at the premerge checks for this one, but it must've slipped my mind 😳 Thanks for looking into it.


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

https://reviews.llvm.org/D118777



More information about the flang-commits mailing list