[all-commits] [llvm/llvm-project] e92564: [flang][OpenMP] Warn that declare simd in an inter...

Carlos Seo via All-commits all-commits at lists.llvm.org
Tue May 26 10:48:35 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e925643b1e7fc936955c0cc01c2c3ce1abd2f4ce
      https://github.com/llvm/llvm-project/commit/e925643b1e7fc936955c0cc01c2c3ce1abd2f4ce
  Author: Carlos Seo <carlos.seo at linaro.org>
  Date:   2026-05-26 (Tue, 26 May 2026)

  Changed paths:
    M flang/lib/Semantics/check-omp-structure.cpp
    A flang/test/Semantics/OpenMP/declare-simd-interface-body.f90
    M flang/test/Semantics/OpenMP/linear-clause03.f90

  Log Message:
  -----------
  [flang][OpenMP] Warn that declare simd in an interface body has no effect (#199248)

Follow-up to the crash fix for #192581. A DECLARE SIMD directive may
legally appear in the specification part of an interface body, but it
applies to the external procedure being declared rather than to any
definition in this compilation. Flang does not propagate the directive
to callers, so it has no effect and is silently dropped during lowering.

Detect this in semantics by checking whether the program unit containing
the directive is an interface body (SubprogramDetails::isInterface())
and emit an -Wopenmp-usage warning so the user knows the directive is
ignored.

Updates #192581



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