[all-commits] [llvm/llvm-project] 3a4e9f: [flang][hlfir] Do not dereference unallocated enti...
Slava Zakharin via All-commits
all-commits at lists.llvm.org
Tue Jun 27 14:09:06 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3a4e9f7ae50980ce8f103cbe86d24c574c8c6cac
https://github.com/llvm/llvm-project/commit/3a4e9f7ae50980ce8f103cbe86d24c574c8c6cac
Author: Slava Zakharin <szakharin at nvidia.com>
Date: 2023-06-27 (Tue, 27 Jun 2023)
Changed paths:
M flang/lib/Lower/ConvertExprToHLFIR.cpp
M flang/runtime/assign.cpp
M flang/test/Lower/HLFIR/structure-constructor.f90
Log Message:
-----------
[flang][hlfir] Do not dereference unallocated entities in structure constructor.
Component-by-component assignment must be able to handle unallocated
allocatable values in structure constructor. F2018 7.5.10 p. 7 states
that the component must have unallocated status as a result of such
construction. The structure constructor temporary is initialized
such that all the allocatable components are unallocated, so we just
need to make sure not to do the component assignment if RHS is deallocated.
Depends on D152482 (the same LIT test is affected)
Reviewed By: jeanPerier, tblah
Differential Revision: https://reviews.llvm.org/D152493
More information about the All-commits
mailing list