Commit c79bb355 by Janus Weil

re PR fortran/47352 ([F03] ICE with proc-pointers in generic procedures)

2011-02-09  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/47352
	* resolve.c (resolve_procedure_interface): If interface has a result
	variable, copy the typespec and set result pointer to self.


2011-02-09  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/47352
	* gfortran.dg/proc_decl_25.f90: New.

From-SVN: r169987
parent 2181e714
2011-02-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/47352
* resolve.c (resolve_procedure_interface): If interface has a result
variable, copy the typespec and set result pointer to self.
2011-02-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/47463
* resolve.c (resolve_typebound_subroutine): Remove erroneous line.
......
......@@ -160,7 +160,10 @@ resolve_procedure_interface (gfc_symbol *sym)
resolve_intrinsic (ifc, &ifc->declared_at);
if (ifc->result)
sym->ts = ifc->result->ts;
{
sym->ts = ifc->result->ts;
sym->result = sym;
}
else
sym->ts = ifc->ts;
sym->ts.interface = ifc;
......
2011-02-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/47352
* gfortran.dg/proc_decl_25.f90: New.
2011-02-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/47463
* gfortran.dg/typebound_assignment_2.f03: New.
......
! { dg-do compile }
!
! PR 47352: [F03] ICE with proc-pointers in generic procedures
!
! Contributed by James van Buskirk
! cf. http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/bbaf59ffd7c372e9
implicit none
abstract interface
real function f()
end function f
end interface
procedure(f) :: f1
interface gen
procedure f1
end interface gen
write(*,*) gen()
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment