public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/29216]  New: Derived type components of function results are not initialised
@ 2006-09-25 15:47 stephan dot kramer at imperial dot ac dot uk
  2006-09-25 16:29 ` [Bug fortran/29216] " pault at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: stephan dot kramer at imperial dot ac dot uk @ 2006-09-25 15:47 UTC (permalink / raw)
  To: gcc-bugs

The derived type components of function results are not initialised according
to their initialisation statements. This follows from the following code:

program test
implicit none

  type A
    integer, pointer:: p => null()
    integer:: i=3
  end type A

  type(A):: x,y

  print *,associated(x%p), x%i
  x=f()
  print *,associated(x%p), x%i

contains

function f()
type(A):: f

  print *, associated(f%p), f%i

end function f

end program

and run-time output:

 F           3
 T -1073745616
 T -1073745616


-- 
           Summary: Derived type components of function results are not
                    initialised
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: stephan dot kramer at imperial dot ac dot uk


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29216


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2006-11-10 21:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-25 15:47 [Bug fortran/29216] New: Derived type components of function results are not initialised stephan dot kramer at imperial dot ac dot uk
2006-09-25 16:29 ` [Bug fortran/29216] " pault at gcc dot gnu dot org
2006-10-08 22:04 ` pault at gcc dot gnu dot org
2006-10-10  7:56 ` fxcoudert at gcc dot gnu dot org
2006-10-10 12:48 ` pault at gcc dot gnu dot org
2006-10-10 20:49 ` pault at gcc dot gnu dot org
2006-10-16 16:51 ` pault at gcc dot gnu dot org
2006-10-17  4:55 ` pault at gcc dot gnu dot org
2006-10-17 14:05 ` patchapp at dberlin dot org
2006-10-18 11:20 ` patchapp at dberlin dot org
2006-10-19  4:51 ` pault at gcc dot gnu dot org
2006-10-19  6:42 ` pault at gcc dot gnu dot org
2006-11-10 21:53 ` pault at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).