[all-commits] [llvm/llvm-project] 392cba: [flang] Handle optional TARGET associate in ASSOCI...
jeanPerier via All-commits
all-commits at lists.llvm.org
Thu Mar 3 01:12:26 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 392cba8603efc41991613d3b3faaca21fd322500
https://github.com/llvm/llvm-project/commit/392cba8603efc41991613d3b3faaca21fd322500
Author: Jean Perier <jperier at nvidia.com>
Date: 2022-03-03 (Thu, 03 Mar 2022)
Changed paths:
M flang/include/flang/Runtime/pointer.h
M flang/runtime/pointer.cpp
Log Message:
-----------
[flang] Handle optional TARGET associate in ASSOCIATED runtime
The TARGET argument of ASSOCIATED may be dynamically optional, in which
case ASSOCIATED(POINTER, TARGET) is equal to ASSOCIATED(TARGET).
Make the runtime argument a pointer so that it can detect and handle
arguments that are dynamically optional.
Also fix the runtime to check if TARGET base address is not null and if
its element size is not null to match the requirement of ASSOCIATED
regarding TARGET:
- if TARGET is an object: true iff [..] TARGET is not a zerosized storage sequence
- if TARGET is a POINTER: true iff [..] POINTER and TARGET are associated
Not that ASSOCIATED will also returns false if TARGET is an unallocated allocatable.
This is not described in the standard, but is a unanimous behaviour of
existing compilers.
Differential Revision: https://reviews.llvm.org/D120835
More information about the All-commits
mailing list