Accessibility-check for GENERIC bindings' targets



Hi,

I just stumbled upon this problem:

MODULE m1

TYPE t1
CONTAINS
PROCEDURE, NOPASS, PRIVATE :: proc
END TYPE t1

CONTAINS

SUBROUTINE proc ()
END SUBROUTINE proc

END MODULE m1

MODULE m2

TYPE, EXTENDS(t1) :: t2
CONTAINS
GENERIC :: gen => proc
END TYPE t2

END MODULE m2

Is the GENERIC binding invalid as it targets a PRIVATE specific binding? Or is this allowed in this case? I couldn't find anything about this in the draft F2003 standard's section about type-bound procedures.

If the code was valid, this would mean that any PRIVATE type-bound procedure can be made accessible by extending the type and defining there a PUBLIC GENERIC binding targetting it, wouldn't it?

Thanks,
Daniel

--
Done: Arc-Bar-Cav-Sam-Val-Wiz, Dwa-Elf-Gno-Hum-Orc, Law-Neu-Cha, Fem-Mal
To go: Hea-Kni-Mon-Pri-Ran-Rog-Tou
.