public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/36528]  New: Cray pointer to function mishandled
@ 2008-06-13 14:30 burnus at gcc dot gnu dot org
  2008-06-13 16:55 ` [Bug fortran/36528] " burnus at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-06-13 14:30 UTC (permalink / raw)
  To: gcc-bugs

http://groups.google.com/group/comp.lang.fortran/msg/86b65bad78e6af78

The following program should compile (with -fcray-pointer) and print on run
time:

 integral f(x) u intervalu [0,1] =  0.49975004
 integral f(x) u intervalu [0,1] =  0.49975004

sunf95 handles this correctly, however, gfortran fails at link time:

undefined reference to `fcn_'

     pointer (pfcn, fcn)
     pfcn = loc(p1) ! p1 is a function interface
        y = y + fcn(x)*dx ! Directly calling p1
     y = euler(0.0,1.0,0.0005,fcn)

The dump shows:
  integer(kind=8) pfcn;
    D.1063 = (integer(kind=8)) p1;
    pfcn = D.1063;
        y = <<< Unknown tree: call_expr
  4
  (real(kind=4) (*<T2ef>) (real(kind=4) &)) pfcn

  &x >>>
  (&x) * dx +y
    y = euler (&C.1072, &C.1073, &C.1074, fcn);

Full source code, see link. I think the test was created/tested for ifort and
gives there an ICE.


-- 
           Summary: Cray pointer to function mishandled
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


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

end of thread, other threads:[~2009-04-06 11:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-13 14:30 [Bug fortran/36528] New: Cray pointer to function mishandled burnus at gcc dot gnu dot org
2008-06-13 16:55 ` [Bug fortran/36528] " burnus at gcc dot gnu dot org
2009-02-11 15:09 ` pault at gcc dot gnu dot org
2009-02-13 21:13 ` pault at gcc dot gnu dot org
2009-03-28 17:09 ` pault at gcc dot gnu dot org
2009-03-28 17:39 ` pault at gcc dot gnu dot org
2009-04-06 11:07 ` 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).