[all-commits] [llvm/llvm-project] 955415: [flang][OpenMP] Avoid analyzing assumed-size array...

Krzysztof Parzyszek via All-commits all-commits at lists.llvm.org
Mon Jul 28 00:38:13 PDT 2025


  Branch: refs/heads/release/21.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 9554152c8a9ce8af926cc31e1cef56a7a2181d9d
      https://github.com/llvm/llvm-project/commit/9554152c8a9ce8af926cc31e1cef56a7a2181d9d
  Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
  Date:   2025-07-28 (Mon, 28 Jul 2025)

  Changed paths:
    M flang/lib/Semantics/check-omp-structure.cpp
    A flang/test/Semantics/OpenMP/assumed-size-array.f90

  Log Message:
  -----------
  [flang][OpenMP] Avoid analyzing assumed-size array bases (#150324)

A check for character substrings masquerading as array sections was
using expression analyzer on the array base. When this array happened to
be an assumed-size array, the analyzer emitted a semantic error that did
not correspond to any issue with the source code.

To avoid that, check whether the object is an assumed-size array before
using the expression analyzer on it.

While at it, replace the call to GetShape with a simple check for rank,
since that's the only information needed.

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

(cherry picked from commit 8fcbd06b25fd0c1b4bc4a4c8775129f7dab1affd)



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