[flang-commits] [flang] [llvm] [flang][MIF] Adding lowering for EVENT POST/WAIT statements (PR #210283)

via flang-commits flang-commits at lists.llvm.org
Fri Oct 16 15:58:07 PDT 2026


================
@@ -297,7 +297,8 @@ struct TypeBuilderImpl {
     if (Fortran::semantics::IsPointer(symbol))
       return fir::wrapInClassOrBoxType(fir::PointerType::get(ty), isPolymorphic,
                                        isAssumedType, symbol.Corank());
-    if (Fortran::semantics::IsAllocatable(symbol))
+    if (Fortran::semantics::IsAllocatable(symbol) ||
----------------
MattPD wrote:

With this PR, every character coarray has a descriptor, so the statement-function problem in https://github.com/llvm/llvm-project/issues/232619 now also affects nonallocatable character coarrays. Before this PR, this program printed `HELLO|HELLO|`:

```fortran
program p
  character(5) :: c[*]
  character(5) :: ch, sf
  sf(ch) = ch
  c = "HELLO"
  print *, c, "|", sf(c), "|"
end program
```

Built with `flang -fcoarray` and run on one image, it now prints descriptor bytes after `HELLO|`. I'll try to see if I can cover this in the fix for #232619.

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


More information about the flang-commits mailing list