aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorTom Eccles <tom.eccles@arm.com>2024-07-19 19:01:27 +0100
committerGitHub <noreply@github.com>2024-07-19 19:01:27 +0100
commita56f37d3bc46f711a1bb8eda6839eb51d1af7d11 (patch)
treee6a08496ed5b4bc2f64df401141666639823c9ca /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent9ba524427321b931bad156860755adf420aeec6a (diff)
downloadllvm-a56f37d3bc46f711a1bb8eda6839eb51d1af7d11.zip
llvm-a56f37d3bc46f711a1bb8eda6839eb51d1af7d11.tar.gz
llvm-a56f37d3bc46f711a1bb8eda6839eb51d1af7d11.tar.bz2
[flang][Lower] get ultimate symbol when querying if pointer or allocatable (#99528)
This fixes a bug in OpenMP privatisation. The privatised variables are created as though they are host associated clones of the original variables. These privatised variables do not contain the allocatable attribute themselves and so we need to check if the ultimate symbol is allocatable. Having or not having this flag influences whether lowering determines that this is a whole allocatable assignment, which then causes hlfir.assign not to get the realloc flag, which cases the allocatable not to be allocated when it is assigned to (leading to a segfault running the newly added test). I also did the same for pointer variables because I would imagine they could experience the same issue. There is no fallout on tests outside of OpenMP, and the gfortran test suite still passes, so I think this doesn't break host other kinds of host associated symbols.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions