[all-commits] [llvm/llvm-project] ef3287: [flang] Defer typing of forward-referenced DATA im...

Eugene Epshteyn via All-commits all-commits at lists.llvm.org
Sat Aug 8 21:35:40 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ef3287453be4e34e75a9e893ab7614b0fa2811e8
      https://github.com/llvm/llvm-project/commit/ef3287453be4e34e75a9e893ab7614b0fa2811e8
  Author: Eugene Epshteyn <eepshteyn at nvidia.com>
  Date:   2026-08-09 (Sun, 09 Aug 2026)

  Changed paths:
    M flang/lib/Semantics/resolve-names.cpp
    A flang/test/Semantics/data25.f90
    A flang/test/Semantics/data26.f90

  Log Message:
  -----------
  [flang] Defer typing of forward-referenced DATA implied-DO indices (#214473)

F2023 19.4 p5 gives a data-i-do-variable without an explicit
integer-type-spec the type that its name would have as a variable of the
innermost scoping unit including the DATA statement. That is a property
of the whole scoping unit: since a data-stmt is a declaration-construct,
the type declaration statement establishing the name's type may follow
the DATA statement in the same specification part. Name resolution
resolved the index eagerly at the DATA statement, so under IMPLICIT
NONE(TYPE) a later declaration drew a spurious "No explicit type
declared" error, and without IMPLICIT NONE a later declaration with a
non-default kind was ignored.

Defer the typing of such indices to the end of the specification part,
mirroring the existing deferral for ordinary DATA statement objects.
DATA statements in an execution part keep the current eager resolution.

Assisted-by: AI



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list