2013-12-14 Janus Weil <janus@gcc.gnu.org>
PR fortran/59502
* primary.c (gfc_match_varspec): Check for 'class_ok'.
2013-12-14 Janus Weil <janus@gcc.gnu.org>
PR fortran/59502
* gfortran.dg/class_57.f90: New.
From-SVN: r205990
2013-12-14 Janus Weil <janus@gcc.gnu.org>
+ PR fortran/59502
+ * primary.c (gfc_match_varspec): Check for 'class_ok'.
+
+2013-12-14 Janus Weil <janus@gcc.gnu.org>
+
PR fortran/59450
* module.c (mio_expr): Handle type-bound function expressions.
if (m != MATCH_YES)
return m;
}
- else if (component->ts.type == BT_CLASS
- && CLASS_DATA (component)->as != NULL
- && !component->attr.proc_pointer)
+ else if (component->ts.type == BT_CLASS && component->attr.class_ok
+ && CLASS_DATA (component)->as && !component->attr.proc_pointer)
{
tail = extend_ref (primary, tail);
tail->type = REF_ARRAY;
+2013-12-14 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/59502
+ * gfortran.dg/class_57.f90: New.
+
2013-12-14 H.J. Lu <hongjiu.lu@intel.com>
PR target/59492
--- /dev/null
+! { dg-do compile }
+!
+! PR 59502: [OOP] ICE on invalid on pointer assignment to non-pointer CLASS
+!
+! Contributed by Andrew Benson <abensonca@gmail.com>
+
+ implicit none
+
+ type :: d
+ end type
+
+ type :: p
+ class(d) :: cc ! { dg-error "must be allocatable or pointer" }
+ end type
+
+contains
+
+ function pc(pd)
+ type(p) :: pc
+ class(d), intent(in), target :: pd
+ pc%cc => pd ! { dg-error "Non-POINTER in pointer association context" }
+ end function
+
+end