[Bug fortran/51514] [OOP] Wrong code when passing a scalar CLASS to a TYPE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51514 janus at gcc dot gnu.org changed: What|Removed |Added CC||janus at gcc dot gnu.org Target Milestone|--- |4.7.0
[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 #6 from Tobias Burnus burnus at gcc dot gnu.org 2012-02-07 08:15:28 UTC --- Author: burnus Date: Tue Feb 7 08:15:14 2012 New Revision: 183954 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=183954 Log: 2012-02-07 Tobias Burnus bur...@net-b.de PR fortran/51514 * trans-expr.c (gfc_conv_procedure_call): Add _data component for calls of scalar CLASS actuals to TYPE dummies. 2012-02-07 Tobias Burnus bur...@net-b.de PR fortran/51514 * gfortran.dg/class_to_type_2.f90: New. Added: trunk/gcc/testsuite/gfortran.dg/class_to_type_2.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-expr.c trunk/gcc/testsuite/ChangeLog
[Bug fortran/51514] [OOP] Wrong code when passing a scalar CLASS to a TYPE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51514 Tobias Burnus burnus at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED --- Comment #7 from Tobias Burnus burnus at gcc dot gnu.org 2012-02-07 08:16:24 UTC --- FIXED on the trunk (4.7).
[Bug fortran/51514] [OOP] Wrong code when passing a scalar CLASS to a TYPE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51514 Tobias Burnus burnus at gcc dot gnu.org changed: What|Removed |Added Summary|[OOP] Wrong code when |[OOP] Wrong code when |passing a CLASS to a TYPE |passing a scalar CLASS to a ||TYPE --- Comment #4 from Tobias Burnus burnus at gcc dot gnu.org 2012-02-06 11:04:25 UTC --- Actually, the issue seems to only affect scalar polymorphic variables. If the actual argument is a polymorphic array, it works. Both as argument to an elemental function and to an array dummy argument.
[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())