------- Additional Comments From paulthomas2 at wanadoo dot fr 2005-01-22 06:19 ------- The problem is in the main program
type(objA),target :: oa type(objB),target :: ob call new(oa,1) call new(ob,oa,2) call print(ob) call print(getOa(ob)) !<<here end program test This works type(objA),target :: oa type(objA),pointer :: ot !<<< type(objB),target :: ob call new(oa,1) call new(ob,oa,2) call print(ob) ot=>getOa(ob) !<<< temporary pointer does call print(ot) !<<< not survive. This does. end program test -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19561