https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66493
--- Comment #7 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Interestingly, there are some tests in the test suite already, especially altreturn_3.f90 and altreturn_8.f90. The latter is using a nopass attribute and compiles. It still should be tested with some real runtime tests, as yours. Some of the following constructed tests fail to compile. $ cat zarc1_1.f90 module m implicit none type t contains procedure :: s1 procedure :: s2 generic :: s => s1, s2 end type contains subroutine s1(*) end subroutine s2(*, *) end end module $ cat zarc1_2_pass.f90 module m implicit none type t contains procedure, pass :: s1 procedure, pass :: s2 generic :: s => s1, s2 end type contains subroutine s1(*) end subroutine s2(*, *) end end module $ cat zarc1_3_nopass.f90 module m implicit none type t contains procedure, nopass :: s1 procedure, nopass :: s2 generic :: s => s1, s2 end type contains subroutine s1(*) end subroutine s2(*, *) end end module $ cat zarcg_1.f90 module m implicit none type t contains procedure :: s1 procedure :: s2 procedure :: s3 generic :: s => s1, s2, s3 end type contains subroutine s1(x) class(t) :: x end subroutine s2(x, *) class(t) :: x end subroutine s3(x, *, *) class(t) :: x end end module $ cat zarcg_2_pass.f90 module m implicit none type t contains procedure, pass :: s1 procedure, pass :: s2 procedure, pass :: s3 generic :: s => s1, s2, s3 end type contains subroutine s1(x) class(t) :: x end subroutine s2(x, *) class(t) :: x end subroutine s3(x, *, *) class(t) :: x end end module $ cat zarcg_3_nopass.f90 module m implicit none type t contains procedure, nopass :: s1 procedure, nopass :: s2 procedure, nopass :: s3 generic :: s => s1, s2, s3 end type contains subroutine s1(x) class(t) :: x end subroutine s2(x, *) class(t) :: x end subroutine s3(x, *, *) class(t) :: x end end module