aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorjeanPerier <jperier@nvidia.com>2023-10-27 09:07:48 +0200
committerGitHub <noreply@github.com>2023-10-27 09:07:48 +0200
commit7046202c3dde093420c08e40116568e76a48ee59 (patch)
treebf12203c42b43c00db8abf37221d5ef8515dd31c /clang/lib/Frontend/CompilerInvocation.cpp
parentfde1ecdec878be591479f508d6a373701deb137e (diff)
downloadllvm-7046202c3dde093420c08e40116568e76a48ee59.zip
llvm-7046202c3dde093420c08e40116568e76a48ee59.tar.gz
llvm-7046202c3dde093420c08e40116568e76a48ee59.tar.bz2
[flang] Move whole allocatable assignment implicit conversion to lowering (#70317)
The front-end is making implicit conversions explicit in assignment and structure constructors. While this generally helps and is needed by semantics to fold structure constructors correctly, this is incorrect when the LHS or component is an allocatable. The RHS may have non default lower bounds that should be propagated to the LHS, and making the conversion explicit changes the semantics. In the structure constructor, the situation is even worse since Fortran 2018 7.5.10 point 7 allows the value to be a reference to an unallocated allocatable, and adding an explicit conversion in semantics will cause a segfault. This patch removes the explicit convert in semantics when the LHS/component is a whole allocatable, and update lowering to deal with the conversion insertion, dealing with preserving the lower bounds and the tricky structure constructor case.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions