PR fortran/54917
* target-memory.c (gfc_target_expr_size,gfc_target_interpret_expr):
Handle BT_CLASS.
2012-11-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/54917
* gfortran.dg/transfer_class_1.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@193262
138bc75d-0d04-0410-961f-
82ee72b054a4
+2012-11-06 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54917
+ * target-memory.c (gfc_target_expr_size,gfc_target_interpret_expr):
+ Handle BT_CLASS.
+
2012-10-14 Janus Weil <janus@gcc.gnu.org>
PR fortran/54784
case BT_HOLLERITH:
return e->representation.length;
case BT_DERIVED:
+ case BT_CLASS:
{
/* Determine type size without clobbering the typespec for ISO C
binding types. */
gfc_interpret_character (buffer, buffer_size, result);
break;
+ case BT_CLASS:
+ result->ts = CLASS_DATA (result)->ts;
+ /* Fall through. */
case BT_DERIVED:
result->representation.length =
gfc_interpret_derived (buffer, buffer_size, result);
+2012-11-06 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54917
+ * gfortran.dg/transfer_class_1.f90: New.
+
2012-11-05 Eric Botcazou <ebotcazou@adacore.com>
* g++.dg/torture/20121105-1.C: New test.
--- /dev/null
+! { dg-do compile }
+! { dg-options "-Wsurprising" }
+!
+! PR 54917: [4.7/4.8 Regression] [OOP] TRANSFER on polymorphic variable causes ICE
+!
+! Contributed by Sean Santos <quantheory@gmail.com>
+
+subroutine test_routine1(arg)
+ implicit none
+ type test_type
+ integer :: test_comp
+ end type
+ class(test_type) :: arg
+ integer :: i
+ i = transfer(arg, 1)
+end subroutine