public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35983]  New: C_LOC in derived type constructor gives weird result
@ 2008-04-20 10:51 fxcoudert at gcc dot gnu dot org
  2008-04-20 11:41 ` [Bug fortran/35983] " burnus at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-04-20 10:51 UTC (permalink / raw)
  To: gcc-bugs

$ cat a.f90 
program main
   use ISO_C_BINDING
   implicit none
   type, bind(C) :: descr
      type(C_PTR) :: address
   end type descr
   type(descr) :: DD
   double precision, target :: buf(1)

   buf = (/ 0 /)
   DD = descr(c_loc(buf))
   print *, transfer(DD%address, 0_c_intptr_t), &
     transfer(c_loc (buf), 0_c_intptr_t)
end program main

$ gfortran a.f90 && ./a.out
           0 -1073744200


-- 
           Summary: C_LOC in derived type constructor gives weird result
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fxcoudert at gcc dot gnu dot org


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


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

end of thread, other threads:[~2008-12-21 15:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-20 10:51 [Bug fortran/35983] New: C_LOC in derived type constructor gives weird result fxcoudert at gcc dot gnu dot org
2008-04-20 11:41 ` [Bug fortran/35983] " burnus at gcc dot gnu dot org
2008-11-05 11:45 ` mikael dot morin at tele2 dot fr
2008-12-09 19:15 ` mikael at gcc dot gnu dot org
2008-12-09 19:44 ` mikael at gcc dot gnu dot org
2008-12-21 15:08 ` mikael at gcc dot gnu dot org
2008-12-21 15:12 ` mikael 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).