gfortran does not compile the following valid code: module m implicit none type :: t integer :: i end type t contains pure function make_a_t(i) result(at) integer, intent(in) :: i type(t) :: at at%i = i end function make_a_t subroutine s() associate( my_t => make_a_t(5) ) write(*,*) my_t%i end associate end subroutine s end module m $ gfortran -c asb.f90 -o asb.o asb.f90:20:18: write(*,*) my_t%i 1 Error: Symbol »my_t« at (1) has no IMPLICIT type $ gfortran --version GNU Fortran (GCC) 7.0.0 20160422 (experimental)
I think it is a duplicate of pr60483. *** This bug has been marked as a duplicate of bug 60483 ***