This simple patch emits correct prototypes when a procedure is
defined via an interface by simply checking the presence
of an interface and using its formal arglist.
gcc/fortran/ChangeLog:
PR fortran/122245
* dump-parse-tree.cc (write_formal_arglist): Take the formal
arglist from the symbol's interface if it is present.
{
gfc_formal_arglist *f;
- for (f = sym->formal; f != NULL; f = f->next)
+ if (sym->ts.interface)
+ f = sym->ts.interface->formal;
+ else
+ f = sym->formal;
+
+ for (; f != NULL; f = f->next)
{
enum type_return rok;
const char *intent_in;