+2016-10-26 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/78092
+ * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Fix reference to an
+ array element of type CLASS.
+
2016-10-26 Paul Thomas <pault@gcc.gnu.org>
PR fortran/78108
TREE_OPERAND (argse.expr, 0), 0)))
|| GFC_DECL_CLASS (TREE_OPERAND (argse.expr, 0)))))
byte_size = gfc_class_vtab_size_get (TREE_OPERAND (argse.expr, 0));
- else if (arg->rank > 0)
+ else if (arg->rank > 0
+ || (arg->rank == 0
+ && arg->ref && arg->ref->type == REF_COMPONENT))
/* The scalarizer added an additional temp. To get the class' vptr
one has to look at the original backend_decl. */
byte_size = gfc_class_vtab_size_get (
+2016-10-26 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/78092
+ * gfortran.dg/pr78092.f90: New test.
+
2016-10-26 Kelvin Nilsen <kelvin@gcc.gnu.org>
PR target/78056
--- /dev/null
+! { dg-do run }
+program test_stuff
+
+ implicit none
+
+ integer :: ivar1(2,3), ivar2
+
+ ivar1 = 6
+ call poly_sizeof(ivar1, ivar2)
+
+ if (ivar2 /= 4) call abort
+
+ contains
+
+ subroutine poly_sizeof(arg1,arg2)
+ class(*), intent(in) :: arg1(:,:)
+ integer, intent(out) :: arg2
+ arg2 = sizeof(arg1(1,1))
+ end subroutine
+
+end program test_stuff