[flang-commits] [flang] flang: allow EXIT to accept integer arguments of any kind (PR #174610)

via flang-commits flang-commits at lists.llvm.org
Mon Jan 19 08:57:53 PST 2026


================
@@ -3852,12 +3851,22 @@ void IntrinsicLibrary::genExit(llvm::ArrayRef<fir::ExtendedValue> args) {
                                           EXIT_SUCCESS)
           : fir::getBase(args[0]);
 
-  assert(status.getType() == builder.getDefaultIntegerType() &&
-         "STATUS parameter must be an INTEGER of default kind");
+  mlir::Type defaultIntTy = builder.getDefaultIntegerType();
+
+  // Warn about non-default integer kinds with -pedantic
+  if (status.getType() != defaultIntTy) {
+    mlir::emitWarning(
+        loc,
+        "EXIT intrinsic with non-default INTEGER kind is a language extension");
+  }
----------------
blazie2004 wrote:

I have removed the warning 

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


More information about the flang-commits mailing list