[all-commits] [llvm/llvm-project] 9b42c0: [Flang] Diagnose nonvariable STAT= specifiers (#21...

nudt_yixiao via All-commits all-commits at lists.llvm.org
Wed Sep 16 07:43:34 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9b42c077c209202d4eabdadec461c73c548e822b
      https://github.com/llvm/llvm-project/commit/9b42c077c209202d4eabdadec461c73c548e822b
  Author: nudt_yixiao <1272950933 at qq.com>
  Date:   2026-09-16 (Wed, 16 Sep 2026)

  Changed paths:
    M flang/lib/Semantics/expression.cpp
    M flang/test/Semantics/resolve94.f90

  Log Message:
  -----------
  [Flang] Diagnose nonvariable STAT= specifiers (#219696)

An image selector STAT= operand can be parsed as a variable but later
resolve to a nonpointer function reference. Passing this expression to
CoarrayRef::set_stat() violates its invariant and triggers a CHECK.

Verify that the analyzed STAT= expression is a variable before calling
set_stat(), and emit a semantic error when it is not.

Add a regression test to resolve94.f90 covering an implicitly typed
nonpointer function reference used as a STAT= specifier.

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

Co-authored-by: yixiao <yixiao at hygon.cn>



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