This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51514] [OOP] Wrong code when passing a scalar CLASS to a TYPE
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 06 Feb 2012 14:04:29 +0000
- Subject: [Bug fortran/51514] [OOP] Wrong code when passing a scalar CLASS to a TYPE
- Auto-submitted: auto-generated
- References: <bug-51514-4@http.gcc.gnu.org/bugzilla/>
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())