re PR fortran/47224 ([F03] ICE with procedure pointer component)

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

	PR fortran/47224
	* resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
	of code.


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

	PR fortran/47224
	* gfortran.dg/proc_ptr_comp_28.f90: New.

From-SVN: r168618
This commit is contained in:
Janus Weil 2011-01-09 22:01:38 +01:00
parent 20ad868865
commit 8977b4bb0d
4 changed files with 27 additions and 15 deletions

View File

@ -1,3 +1,9 @@
2011-01-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/47224
* resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
of code.
2011-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/38536

View File

@ -1528,7 +1528,6 @@ resolve_actual_arglist (gfc_actual_arglist *arg, procedure_type ptype,
gfc_symtree *parent_st;
gfc_expr *e;
int save_need_full_assumed_size;
gfc_component *comp;
for (; arg; arg = arg->next)
{
@ -1548,20 +1547,6 @@ resolve_actual_arglist (gfc_actual_arglist *arg, procedure_type ptype,
continue;
}
if (gfc_is_proc_ptr_comp (e, &comp))
{
e->ts = comp->ts;
if (e->expr_type == EXPR_PPC)
{
if (comp->as != NULL)
e->rank = comp->as->rank;
e->expr_type = EXPR_FUNCTION;
}
if (gfc_resolve_expr (e) == FAILURE)
return FAILURE;
goto argument_list;
}
if (e->expr_type == EXPR_VARIABLE
&& e->symtree->n.sym->attr.generic
&& no_formal_args

View File

@ -1,3 +1,8 @@
2011-01-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/47224
* gfortran.dg/proc_ptr_comp_28.f90: New.
2011-01-09 Iain Sandoe <iains@gcc.gnu.org>
* obj-c++.dg/gnu-api-2-class.mm: Skip for Darwin < 9.

View File

@ -0,0 +1,16 @@
! { dg-do compile }
!
! PR 47224: [F03] ICE with procedure pointer component
!
! Contributed by Martien Hulsen <m.a.hulsen@tue.nl>
type coefficients_t
procedure (real), pointer, nopass :: vfunc
end type
type(coefficients_t) :: coeff
real, dimension(3) :: x
print *, abs ( coeff%vfunc ( x(:) ) )
end