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
This commit is contained in:
parent
2181e7141c
commit
c79bb35514
4 changed files with 37 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
22
gcc/testsuite/gfortran.dg/proc_decl_25.f90
Normal file
22
gcc/testsuite/gfortran.dg/proc_decl_25.f90
Normal file
|
@ -0,0 +1,22 @@
|
|||
! { 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
|
Loading…
Add table
Reference in a new issue