Hi,
I get an internal compiler error with the following code, with both version 15.0.2 and 16 beta. This code seems valid to me.
program toto implicit none class(*),pointer :: obj integer,pointer :: v integer :: i i=1 obj => tete(i) select type( vv => tete(i)) !! USING obj here works as expected. type is (integer) print *,vv class default print *,'unknown' end select contains function tete(obj) class(*) :: obj class(*),pointer :: tete allocate(tete,source=obj) end function end program toto