This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/51514] [OOP] Wrong code when passing a scalar CLASS to a TYPE


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

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-06 14:04:29 UTC ---
Created attachment 26583
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26583
Completely untested/not compiled draft patch

The attached patch is completely untested. It additionally contains some - also
untested - fixes for polymophic coarrays.

Variant:

  subroutine subpr2(x)
    type(foo) :: x
    print *,x%i
    if (x%i /= 55) call abort ()
  end subroutine
  function f()
    class(foo), allocatable :: f
    allocate (f)
    f%i = 55
  end function f
with
  call subpr(f())


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]