diff options
author | Peter Steinfeld <psteinfeld@nvidia.com> | 2021-02-12 13:28:58 -0800 |
---|---|---|
committer | Peter Steinfeld <psteinfeld@nvidia.com> | 2021-02-16 14:40:35 -0800 |
commit | 77dc203cd0f65a8dbd71f3814e0cc3199c791980 (patch) | |
tree | 576cb685401b81decbff78216f57541716ac5115 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | bfa4235e6e92ce2d3df486828ca2b6aef9705c07 (diff) | |
download | llvm-77dc203cd0f65a8dbd71f3814e0cc3199c791980.zip llvm-77dc203cd0f65a8dbd71f3814e0cc3199c791980.tar.gz llvm-77dc203cd0f65a8dbd71f3814e0cc3199c791980.tar.bz2 |
[flang] Detect circularly defined procedures
It's possible to define a procedure that has a procedure dummy argument which
names the procedure that contains it. This was causing the compiler to fall
into an infinite loop when characterizing a call to the procedure.
Following a suggestion from Peter, I fixed this be maintaining a set of
procedure symbols that had already been seen while characterizing a procedure.
This required passing a new parameter to the functions that characterized a
Procedure, a DummyArgument, and a DummyProcedure.
I also added several tests that will crash the compiler without this change.
Differential Revision: https://reviews.llvm.org/D96631
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions