[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
Loading
Please sign in to comment