re PR fortran/41242 (PPC call rejected (related to user-defined assignment?))
2009-09-11 Janus Weil <janus@gcc.gnu.org> PR fortran/41242 * resolve.c (resolve_ordinary_assign): Don't call resolve_code, to avoid that subsequent codes are resolved more than once. (resolve_code): Make sure that type-bound assignment operators are resolved correctly. 2009-09-11 Janus Weil <janus@gcc.gnu.org> PR fortran/41242 * gfortran.dg/proc_ptr_comp_21.f90: New. From-SVN: r151620
This commit is contained in:
parent
68bcdeed11
commit
664e411ba5
@ -1,3 +1,12 @@
|
||||
2009-09-11 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/41242
|
||||
* resolve.c (resolve_ordinary_assign): Don't call resolve_code,
|
||||
to avoid that subsequent codes are resolved more than once.
|
||||
(resolve_code): Make sure that type-bound assignment operators are
|
||||
resolved correctly.
|
||||
|
||||
|
||||
2009-09-10 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR fortran/31292
|
||||
|
@ -6958,7 +6958,6 @@ resolve_ordinary_assign (gfc_code *code, gfc_namespace *ns)
|
||||
&& (lhs->symtree->n.sym == (*rhsptr)->symtree->n.sym))
|
||||
*rhsptr = gfc_get_parentheses (*rhsptr);
|
||||
|
||||
resolve_code (code, ns);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -7190,7 +7189,12 @@ resolve_code (gfc_code *code, gfc_namespace *ns)
|
||||
break;
|
||||
|
||||
if (resolve_ordinary_assign (code, ns))
|
||||
goto call;
|
||||
{
|
||||
if (code->op == EXEC_COMPCALL)
|
||||
goto compcall;
|
||||
else
|
||||
goto call;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@ -7241,6 +7245,7 @@ resolve_code (gfc_code *code, gfc_namespace *ns)
|
||||
break;
|
||||
|
||||
case EXEC_COMPCALL:
|
||||
compcall:
|
||||
resolve_typebound_call (code);
|
||||
break;
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2009-09-11 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/41242
|
||||
* gfortran.dg/proc_ptr_comp_21.f90: New.
|
||||
|
||||
2009-09-10 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR fortran/31292
|
||||
|
28
gcc/testsuite/gfortran.dg/proc_ptr_comp_21.f90
Normal file
28
gcc/testsuite/gfortran.dg/proc_ptr_comp_21.f90
Normal file
@ -0,0 +1,28 @@
|
||||
! { dg-do compile }
|
||||
!
|
||||
! PR 41242: [4.5 Regression] PPC call rejected (related to user-defined assignment?)
|
||||
!
|
||||
! Original test case by Juergen Reuter <reuter@physik.uni-freiburg.de>
|
||||
! Modified by Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
type :: nf_t
|
||||
procedure(integer), nopass, pointer :: get_n_in
|
||||
end type
|
||||
|
||||
interface assignment(=)
|
||||
procedure op_assign
|
||||
end interface
|
||||
|
||||
type(nf_t) :: prc_lib
|
||||
prc_lib = "foobar"
|
||||
print *, prc_lib%get_n_in()
|
||||
|
||||
contains
|
||||
|
||||
elemental subroutine op_assign (str, ch)
|
||||
type(nf_t), intent(out) :: str
|
||||
character(len=*), intent(in) :: ch
|
||||
end subroutine
|
||||
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user