public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/40870]  New: [F03] include formal args in backend_decl of PPCs
@ 2009-07-27  8:12 janus at gcc dot gnu dot org
  2009-08-03 20:17 ` [Bug fortran/40870] " janus at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-07-27  8:12 UTC (permalink / raw)
  To: gcc-bugs

Another PPC leftover item, cf. trans-types.c (gfc_get_ppc_type): When
translating the Fortran frontend structures to a backend tree, the argument
list of procedure pointer components is currently not being used.

This becomes visible in a test case like this:


implicit none
procedure(foo), pointer :: pp
type :: t
  procedure(foo), pointer, nopass :: ppc
end type
type(t)::o

pp => foo
o%ppc => foo
pp => o%ppc

contains

  integer function foo(a,b)
    integer, intent(in) :: a,b
    foo = a + b
  end function

end


Compiling with -fdump-tree-original shows the following code for the three
pointer assignments:

  pp = foo;
  o.ppc = (integer(kind=4) (*<T3c6>) (void)) foo;
  pp = (integer(kind=4) (*<T3c8>) (integer(kind=4) &, integer(kind=4) &))
o.ppc;

The first one is ok, but the last two involve type casting, although they have
exactly the same interface (simply because the arguments of the PPC are
missing).


-- 
           Summary: [F03] include formal args in backend_decl of PPCs
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: janus at gcc dot gnu dot org


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


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

end of thread, other threads:[~2009-08-18 14:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-27  8:12 [Bug fortran/40870] New: [F03] include formal args in backend_decl of PPCs janus at gcc dot gnu dot org
2009-08-03 20:17 ` [Bug fortran/40870] " janus at gcc dot gnu dot org
2009-08-18 14:24 ` janus at gcc dot gnu dot org
2009-08-18 14:25 ` janus 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).