The following program fails because the function result in "f" is never initialized. It should be default initialized, which works using other compilers.
type A integer, pointer:: p => null () integer:: i=3 end type A type(A):: x x=f() if (associated(x%p) .or. x%i /= 3) call abort () contains function f() result (fr) type(A):: fr end function f end -- Summary: Default initialization of derived-type function result missing Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org OtherBugsDependingO 32834 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45489