[Bug fortran/49961] [OOP] type-bound function can not return a pointer of a array

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Aug 4 17:25:00 GMT 2011


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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
                 CC|                            |janus at gcc dot gnu.org
            Summary|type bounded function can   |[OOP] type-bound function
                   |not return a pointer of a   |can not return a pointer of
                   |array                       |a array

--- Comment #3 from janus at gcc dot gnu.org 2011-08-04 17:24:29 UTC ---
Here's maximally reduced test case:

module aa
  type bb
  end type
contains
  function getcc(this)  result(cc)
    class(bb) :: this
    integer,dimension(2) :: cc
  end function
end module

  use aa
  type(bb) :: b1
  print *,getcc(b1)
end


Apparently this PR is a duplicate of PR42051/PR43896 and has supposedly been
fixed by r160622:

http://gcc.gnu.org/viewcvs?view=revision&revision=160622

The patch looks very simple and it may be feasible to backport it to 4.5.



More information about the Gcc-bugs mailing list