Commit f1a0b754 by Janus Weil

re PR fortran/44211 ([OOP] ICE with TBP of pointer component of derived type array)

2010-06-09  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/44211
	* resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
	Resolve references.


2010-06-09  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/44211
	* gfortran.dg/typebound_call_14.f03: New test.

From-SVN: r160478
parent 6ef9e52d
2010-06-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/44211
* resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
Resolve references.
2010-06-09 Kai Tietz <kai.tietz@onevision.com>
* resolve.c (resolve_deallocate_expr): Avoid warning
......
......@@ -5415,6 +5415,9 @@ resolve_typebound_function (gfc_expr* e)
if (st == NULL)
return resolve_compcall (e, NULL);
if (resolve_ref (e) == FAILURE)
return FAILURE;
/* Get the CLASS declared type. */
declared = get_declared_from_expr (&class_ref, &new_ref, e);
......@@ -5487,6 +5490,9 @@ resolve_typebound_subroutine (gfc_code *code)
if (st == NULL)
return resolve_typebound_call (code, NULL);
if (resolve_ref (code->expr1) == FAILURE)
return FAILURE;
/* Get the CLASS declared type. */
declared = get_declared_from_expr (&class_ref, &new_ref, code->expr1);
......
2010-06-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/44211
* gfortran.dg/typebound_call_14.f03: New test.
2010-06-09 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/44423
......
! { dg-do compile }
!
! PR 44211: [OOP] ICE with TBP of pointer component of derived type array
!
! Original test case by Hans-Werner Boschmann <boschmann@tp1.physik.uni-siegen.de>
! Modified by Janus Weil <janus@gcc.gnu.org>
module ice_module
type::ice_type
class(ice_type),pointer::next
contains
procedure::ice_sub
procedure::ice_fun
end type ice_type
contains
subroutine ice_sub(this)
class(ice_type)::this
end subroutine
integer function ice_fun(this)
class(ice_type)::this
end function
subroutine ice()
type(ice_type),dimension(2)::ice_array
call ice_array(1)%next%ice_sub()
print *,ice_array(2)%next%ice_fun()
end subroutine
end module ice_module
! { dg-final { cleanup-modules "ice_module" } }
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