Commit 0a59e583 by Janus Weil

re PR fortran/54778 ([OOP] an ICE on invalid OO code)

2012-10-02  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/54778
	* interface.c (matching_typebound_op): Check for 'class_ok' attribute.

2012-10-02  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/54778
	* gfortran.dg/class_53.f90: New.

From-SVN: r192005
parent 1504e3e1
2012-10-02 Janus Weil <janus@gcc.gnu.org>
PR fortran/54778
* interface.c (matching_typebound_op): Check for 'class_ok' attribute.
2012-09-30 Janus Weil <janus@gcc.gnu.org>
PR fortran/54667
......
......@@ -3386,7 +3386,8 @@ matching_typebound_op (gfc_expr** tb_base,
if (base->expr->ts.type == BT_CLASS)
{
if (CLASS_DATA (base->expr) == NULL)
if (CLASS_DATA (base->expr) == NULL
|| !gfc_expr_attr (base->expr).class_ok)
continue;
derived = CLASS_DATA (base->expr)->ts.u.derived;
}
......
2012-10-02 Janus Weil <janus@gcc.gnu.org>
PR fortran/54778
* gfortran.dg/class_53.f90: New.
2012-10-02 Alexandre Oliva <aoliva@redhat.com>
PR debug/54551
......
! { dg-do compile }
!
! PR 54778: [OOP] an ICE on invalid OO code
!
! Contributed by Sylwester Arabas <slayoo@staszic.waw.pl>
implicit none
type :: arr_t
real :: at
end type
type(arr_t) :: this
class(arr_t) :: elem ! { dg-error "must be dummy, allocatable or pointer" }
elem = this ! { dg-error "Variable must not be polymorphic in intrinsic assignment" }
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