[Bug fortran/60458] Error message on associate: deferred type parameter and requires either the pointer or allocatable attribute
antony at cosmologist dot info
gcc-bugzilla@gcc.gnu.org
Mon Mar 10 10:58:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60458
--- Comment #2 from Antony Lewis <antony at cosmologist dot info> ---
Here's a related example:
module A
implicit none
Type T
integer :: val = 2
contains
final :: testfree
end type
contains
subroutine testfree(this)
Type(T) this
print *,'freed'
end subroutine
subroutine Testf()
associate(X => T())
print *, X%val
end associate
print *,'after scope'
end subroutine Testf
end module
which gives
print *, X%val
1
Error: Symbol 'x' at (1) has no IMPLICIT type
(I was checking if finalization is called correctly, but didn't get that far)
This code compiles in ifort.
More information about the Gcc-bugs
mailing list