[flang-commits] [flang] [Flang] Diagnose nonvariable STAT= specifiers (PR #219696)

via flang-commits flang-commits at lists.llvm.org
Wed Sep 16 02:14:30 PDT 2026


================
@@ -47,6 +47,8 @@ subroutine s1()
   rVar1 = rCoarray[1,2,3,STAT=rVar2]
   !ERROR: Must be a scalar value, but is a rank-1 array
   rVar1 = rCoarray[1,2,3,STAT=intArray]
+  !ERROR: STAT= specifier must be a scalar integer variable
+  rVar1 = rCoarray[1,2,3,STAT=MASK(2)]
----------------
keepyixiao wrote:

Done, thanks. I added the named constant case using an INTEGER, PARAMETER constant. This covers the other IsVariable() path described in F'2023 C901.

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


More information about the flang-commits mailing list