InlineTrans (and PSyIR) does not support routine arguments with the `optional` attribute.
InlineTrans will refuse to countenance a routine if it has optional arguments since they end up as DataSymbols of UnknownFortranType. This is an issue for the NEMO sea-ice code.
We could probably add support for the optional attribute @sergisiso?
I don't see any issue adding support for the optional attribute (other than the more complicated logic when we want to match signatures for caller-callee like in the InlineTrans, but this is specifically what we want them for).
This pull request (currently under review by Andy)
https://github.com/stfc/PSyclone/pull/2775
will provide the subroutine
get_argument_routine_match(...)
which returns a list of the indices of the matching arguments from a call to a subroutine with support for optional as well as named arguments.
Once this is accepted, updating the inlining with respect should be easy with this list.
@arporter , can this be closed now?
I think so. The fact that PSyIR doesn't directly support the optional attribute can be tackled separately if anyone cares :-)