[clang-tools-extra] [libc] [clang] [compiler-rt] [llvm] [flang] Apply kind code check on exitstat and cmdstat (PR #78286)

Peter Klausler via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 23 09:07:02 PST 2024


================
@@ -122,10 +122,22 @@ void RTNAME(ExecuteCommandLine)(const Descriptor &command, bool wait,
 
   if (exitstat) {
     RUNTIME_CHECK(terminator, IsValidIntDescriptor(exitstat));
+    auto exitstatKind{exitstat->type().GetCategoryAndKind()->second};
+    if (exitstatKind < 4) {
----------------
klausler wrote:

The runtime code doesn't need to check these descriptors -- that will have been done statically when the intrinsic procedure reference was analyzed!

What has to be done in the runtime is using those descriptors to store the integer result values properly, and I think that the code already does that.

https://github.com/llvm/llvm-project/pull/78286


More information about the cfe-commits mailing list