[Bug fortran/41706] [OOP] Calling one TBP as an actual argument of another TBP
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41706 janus at gcc dot gnu.org changed: What|Removed |Added Target Milestone|--- |4.5.0
[Bug fortran/41706] [OOP] Calling one TBP as an actual argument of another TBP
--- Comment #6 from janus at gcc dot gnu dot org 2009-10-21 08:57 --- Subject: Bug 41706 Author: janus Date: Wed Oct 21 08:56:56 2009 New Revision: 153049 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=153049 Log: 2009-10-21 Janus Weil ja...@gcc.gnu.org PR fortran/41706 PR fortran/41766 * match.c (select_type_set_tmp): Set flavor for temporary. * resolve.c (resolve_class_typebound_call): Correctly resolve actual arguments. 2009-10-21 Janus Weil ja...@gcc.gnu.org PR fortran/41706 PR fortran/41766 * gfortran.dg/class_9.f03: Extended test case. * gfortran.dg/select_type_7.f03: New test case. Added: trunk/gcc/testsuite/gfortran.dg/select_type_7.f03 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/match.c trunk/gcc/fortran/resolve.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/class_9.f03 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41706
[Bug fortran/41706] [OOP] Calling one TBP as an actual argument of another TBP
--- Comment #7 from janus at gcc dot gnu dot org 2009-10-21 09:01 --- Fixed with r153049. Closing. -- janus at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41706
[Bug fortran/41706] [OOP] Calling one TBP as an actual argument of another TBP
--- Comment #3 from janus at gcc dot gnu dot org 2009-10-20 11:30 --- Reopening. Salvatore's code still fails with the same error, which is due to the analogous case with a subroutine: module m type :: t contains procedure, nopass :: a procedure, nopass :: b end type contains subroutine a (x) real :: x print *,x end subroutine real function b () b = 3. end function subroutine s class(t),allocatable :: x real :: r allocate(x) call x%a(x%b()) ! fails end subroutine end -- janus at gcc dot gnu dot org changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|FIXED | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41706
[Bug fortran/41706] [OOP] Calling one TBP as an actual argument of another TBP
--- Comment #4 from paul dot richard dot thomas at gmail dot com 2009-10-20 12:19 --- Subject: Re: [OOP] Calling one TBP as an actual argument of another TBP Oh bother! I completely forgot to test the subroutine branch - thanks Janus On Tue, Oct 20, 2009 at 1:30 PM, janus at gcc dot gnu dot org gcc-bugzi...@gcc.gnu.org wrote: --- Comment #3 from janus at gcc dot gnu dot org 2009-10-20 11:30 --- Reopening. Salvatore's code still fails with the same error, which is due to the analogous case with a subroutine: module m type :: t contains procedure, nopass :: a procedure, nopass :: b end type contains subroutine a (x) real :: x print *,x end subroutine real function b () b = 3. end function subroutine s class(t),allocatable :: x real :: r allocate(x) call x%a(x%b()) ! fails end subroutine end -- janus at gcc dot gnu dot org changed: What |Removed |Added Status|RESOLVED |UNCONFIRMED Resolution|FIXED | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41706 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41706
[Bug fortran/41706] [OOP] Calling one TBP as an actual argument of another TBP
--- Comment #5 from janus at gcc dot gnu dot org 2009-10-20 12:29 --- (In reply to comment #4) Oh bother! I completely forgot to test the subroutine branch - thanks Janus But in your patch you do the argument resolution both in resolve_class_compcall and resolve_class_typebound_call, which should take care of type-bound functions *and* subroutines, shouldn't it? Therefore I don't see why it still fails for subroutines ... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41706
[Bug fortran/41706] [OOP] Calling one TBP as an actual argument of another TBP
--- Comment #1 from pault at gcc dot gnu dot org 2009-10-20 04:17 --- Subject: Bug 41706 Author: pault Date: Tue Oct 20 04:16:02 2009 New Revision: 153004 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=153004 Log: 2009-10-20 Paul Thomas pa...@gcc.gnu.org PR fortran/41706 * resolve.c (resolve_arg_exprs): New function. (resolve_class_compcall): Call the above. (resolve_class_typebound_call): The same. 2009-10-20 Paul Thomas pa...@gcc.gnu.org PR fortran/41706 * gfortran.dg/class_9 : New test. Added: trunk/gcc/testsuite/gfortran.dg/class_9.f03 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/resolve.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41706
[Bug fortran/41706] [OOP] Calling one TBP as an actual argument of another TBP
--- Comment #2 from pault at gcc dot gnu dot org 2009-10-20 04:52 --- Fixed on trunk. Thanks for the report! Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41706