[all-commits] [llvm/llvm-project] ed5e6b: [flang] Catch calls to impure intrinsics from PURE...
Peter Klausler via All-commits
all-commits at lists.llvm.org
Tue Sep 30 10:37:14 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ed5e6b87013485c7b16d825e0cbf556a1e7e3e19
https://github.com/llvm/llvm-project/commit/ed5e6b87013485c7b16d825e0cbf556a1e7e3e19
Author: Peter Klausler <pklausler at nvidia.com>
Date: 2025-09-30 (Tue, 30 Sep 2025)
Changed paths:
M flang/include/flang/Evaluate/intrinsics.h
M flang/lib/Evaluate/intrinsics.cpp
M flang/lib/Semantics/expression.cpp
M flang/lib/Semantics/resolve-names.cpp
A flang/test/Semantics/bug157124.f90
Log Message:
-----------
[flang] Catch calls to impure intrinsics from PURE subprograms (#160947)
The code in expression semantics that catches a call to an impure
procedure in a PURE context misses calls to impure intrinsics, since
their designators have a SpecificIntrinsic rather than a Symbol. Replace
the current check with a new one that uses the characteristics of the
called procedure, which works for both intrinsic and non-intrinsic
cases.
Testing this change revealed that an explicit INTRINSIC statement wasn't
doing the right thing for extension "dual" intrinsics that can be called
as either a function or as a subroutine; the use of an INTRINSIC
statement would disallow its use as a subroutine. I've fixed that here
as well.
Fixes https://github.com/llvm/llvm-project/issues/157124.
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