http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51514
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-06 14:04:29 UTC --- Created attachment 26583 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26583 Completely untested/not compiled draft patch The attached patch is completely untested. It additionally contains some - also untested - fixes for polymophic coarrays. Variant: subroutine subpr2(x) type(foo) :: x print *,x%i if (x%i /= 55) call abort () end subroutine function f() class(foo), allocatable :: f allocate (f) f%i = 55 end function f with call subpr(f())