2016-10-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/71895
* interface.c (gfc_compare_derived_types): Convert gcc_assert()
to a gfc_internal_error() to prevent an ICE.
2016-10-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/71895
* gfortran.dg/pr71895.f90: New test.
From-SVN: r241493
+2016-10-24 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/71895
+ * interface.c (gfc_compare_derived_types): Convert gcc_assert()
+ to a gfc_internal_error() to prevent an ICE.
+
2016-10-24 Jakub Jelinek <jakub@redhat.com>
* trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use VAR_P (x)
if (derived1 == derived2)
return 1;
- gcc_assert (derived1 && derived2);
+ if (!derived1 || !derived2)
+ gfc_internal_error ("gfc_compare_derived_types: invalid derived type");
/* Compare UNION types specially. */
if (derived1->attr.flavor == FL_UNION || derived2->attr.flavor == FL_UNION)
+2016-10-24 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/71895
+ * gfortran.dg/pr71895.f90: New test.
+
2016-10-24 Jakub Jelinek <jakub@redhat.com>
* g++.dg/debug/dwarf2/ref-2.C: New test.
--- /dev/null
+! { dg-do compile }
+program p
+ type t
+ integer :: n
+ end type
+ type(t) :: x
+ class(t) :: y ! { dg-error "must be dummy, allocatable or pointer" }
+ print *, extends_type_of(x, y)
+ print *, extends_type_of(y, x)
+end