The pass was raising TODOs when a function both had a fir.boxproc<> argument
and a fir.type<> argument (even if the fir.type<> did not contain a
fir.boxproc itself).
Prevent the TODO from firing when a fir.type<> does not actually contain
a fir.boxproc. Add the location for the remaining TODO (it will be
needed when procedure pointer components are supported in lowering).
FYI, I actually tried to just implement the TODO, but I there is a funny
issue. When creating the new fir::RecordType, since the name and context
are the same as the type being translated, fir::RecordType:get just
returns the existing type, and there is no way to change it (finalize()
does nothing since it is already finalized). So this will require to add
the ability to mutate the existing type, and I am not sure what are the
MLIR constraints here, so I escaped and left the TODO for that case.
The pass was raising TODOs when a function both had a
fir.boxproc<>
argument and afir.type<>
argument (even if thefir.type<>
did not contain a fir.boxproc itself).Prevent the TODO from firing when a fir.type<> does not actually contain a fir.boxproc. Add the location for the remaining TODO (it will be needed when procedure pointer components are supported in lowering).
FYI, I actually tried to just implement the TODO, but I there is a funny issue. When creating the new fir::RecordType, since the name and context are the same as the type being translated, fir::RecordType:get just returns the existing type, and there is no way to change it (finalize() does nothing since it is already finalized). So this will require to add the ability to mutate the existing type, and I am not sure what are the MLIR constraints here, so I escaped and left the TODO for that case.