https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66409

--- Comment #9 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to Jeff Hammond from comment #2)
> 
> My MCVE:
> 
> module f
>     implicit none
> 
>     interface test
>         module procedure test_f08
>         module procedure test_f08ts
>     end interface test
> 
>     contains
> 
>         subroutine test_f08(buf)
>             integer :: buf
>         end subroutine test_f08
> 
>         subroutine test_f08ts(buffer)
>             type(*), dimension(..), intent(inout) :: buffer
>         end subroutine test_f08ts
> 
> end module f

The following variant is not pretty, and I don't know if it does the job.
But at least it is accepted by the compiler.


module f
    implicit none

    interface test
        module procedure test_f08ts
    end interface test

    contains

        subroutine test_f08(buf)
            integer :: buf
        end subroutine test_f08

        subroutine test_f08ts(buffer)
            class(*), dimension(..), intent(inout) :: buffer
            select rank(a => buffer)
              rank(0)
                select type(b => a)
                  type is(integer)
                    call test_f08(b)
                end select
            end select
        end subroutine test_f08ts

end module f

Reply via email to