Open reuterbal opened 2 years ago
Apologies, just realized that this is not a proc-component-def-stmt but of course a specific-binding, for which multiple declarations per line were only added with Fortran 2008. So it's not actually a bug but a missing feature for F2008 support.
I just ran into the same issue. Since I already looked up the details in the standards, I'll add them here: Fortran 2003:
R450: proc-binding-stmt is specific-binding
or generic-binding
or final-binding
R451 specific-binding is PROCEDURE [ (interface-name) ]
[ [ , binding-attr -list ] :: ]
binding-name [ => procedure-name ]
So, a single name only, as @reuterbal pointed out.
In Fortran 2008, this is now:
R447 type-bound-proc-binding is type-bound-procedure-stmt
or type-bound-generic-stmt
or final-procedure-stmt
R448 type-bound-procedure-stmt is PROCEDURE [ [ , binding-attr -list ] :: ] type-bound-proc-decl -list
or PROCEDURE (interface-name), binding-attr -list :: binding-name-list
R449 type-bound-proc-decl is binding-name [ => procedure-name ]
Hi,
slowly making our way into OOP interfaces and found a new issue today. Type-bound procedure definitions don't match when multiple procedures are provided in the same declaration as in the example below:
Two separate
procedure, private :: ...
declarations with one procedure name each parse fine. Standard expects a proc-decl-list, so multiple names should be allowed (gfortran --pedantic -Wall
is fine with it, too).