http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50552
--- Comment #2 from kargl at gcc dot gnu.org 2011-10-16 23:55:49 UTC --- (In reply to comment #1) > (In reply to comment #0) > > ! type name cannot be statement function dummy argument (r178939) > > type t > > real g > > end type > > f(t)=0 ! this should not be accepted > > end > > I can't find anything in the standard that confirms your > statement. Can you point me to where the standard would > prohibit the above code? I should also note that I cannot construct a program, which actually uses the statement function. All attempts end with an error message being emitted. I believe that this may be a non-issue. These 4 programs fail to compile. ! type t ! integer :: i = 42 ! end type ! type(t) s ! f(t) = 0 ! print *, f(s) ! end ! ! type t ! integer :: i = 42 ! end type ! type(t) s ! f(t) = t%i ! print *, f(s) ! end ! ! implicit none ! type t ! integer :: i = 42 ! end type ! type(t) s ! f(t) = t%i ! print *, f(s) ! end ! implicit none type t integer :: i = 42 end type type(t) s f(t) = 0 print *, f(s) end