[flang-commits] [flang] [llvm] [flang] Enumeration Type: (PR 3/5) Intrinsics + I/O + Modules (PR #193235)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Fri Aug 28 08:31:44 PDT 2026


https://github.com/eugeneepshteyn commented:

This is definitely moving in the right direction and I think it's getting really close.

Please check the following examples also:

```fortran
type :: holder
  type(color) :: c    ! enum direct component
end type

subroutine s
  type(holder) :: h
  namelist /nml/ h    ! C8109 violated identically to case 1 — but accepted
end subroutine
```
and
```fortran
type :: mid
  type(color) :: c
contains
  procedure :: wf
  generic :: write(formatted) => wf   ! defined I/O on mid
end type

type :: shielded_outer
  type(mid) :: md      ! non-pointer ⇒ c is a DIRECT component of shielded_outer
end type

subroutine t1
  type(shielded_outer) :: d
  namelist /nml1/ d
  write(*, nml=nml1)   ! I/O happens — and it's STILL accepted
end subroutine
```


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


More information about the flang-commits mailing list