[all-commits] [llvm/llvm-project] 22c59e: [flang] Don't crash on bad inherited implied DO ty...

Peter Klausler via All-commits all-commits at lists.llvm.org
Thu May 9 10:17:37 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 22c59e01cd2f87164301415c93b60fc3c204dfb8
      https://github.com/llvm/llvm-project/commit/22c59e01cd2f87164301415c93b60fc3c204dfb8
  Author: Peter Klausler <35819229+klausler at users.noreply.github.com>
  Date:   2024-05-09 (Thu, 09 May 2024)

  Changed paths:
    M flang/docs/Extensions.md
    M flang/lib/Evaluate/formatting.cpp
    M flang/lib/Semantics/expression.cpp
    M flang/lib/Semantics/resolve-names.cpp
    A flang/test/Semantics/array-constr-index01.f90

  Log Message:
  -----------
  [flang] Don't crash on bad inherited implied DO type (#91073)

Fortran has an ambiguously defined rule about the typing of index
variables of implied DO loops in DATA statements and array constructors
that omit an explicit type specification. Such indices have the type
that they would have "if they were variables" in the innermost enclosing
scope. Although this could, and perhaps should, be read to mean that
implicit typing rules active in that innermost enclosing scope should be
applied, every other Fortran compiler interprets that language to mean
that if there is a type declaration for that name that is visible from
the enclosing scope, it is applied, and it is an error if that type is
not integer.

Fixes https://github.com/llvm/llvm-project/issues/91053.



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