gcc/fortran/
PR fortran/91586
* class.c (gfc_find_derived_vtab): Return NULL
instead of deref'ing NULL pointer.
gcc/testsuite/
PR fortran/91586
* gfortran.dg/class_71.f90: New.
From-SVN: r277153
+2019-10-18 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/91586
+ * class.c (gfc_find_derived_vtab): Return NULL
+ instead of deref'ing NULL pointer.
+
2019-10-15 James Norris <jnorris@codesourcery.com>
Tobias Burnus <tobias@codesourcery.com>
if (!derived->attr.unlimited_polymorphic && derived->attr.is_class)
derived = gfc_get_derived_super_type (derived);
+ if (!derived)
+ return NULL;
+
/* Find the gsymbol for the module of use associated derived types. */
if ((derived->attr.use_assoc || derived->attr.used_in_submodule)
&& !derived->attr.vtype && !derived->attr.is_class)
+2019-10-18 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/91586
+ * gfortran.dg/class_71.f90: New.
+
2019-10-18 Georg-Johann Lay <avr@gjlay.de>
Fix some fallout for small targets.
--- /dev/null
+! { dg-do compile }
+!
+! PR fortran/91586
+!
+! Contributed by G. Steinmetz
+!
+program p
+ type t
+ class(*), allocatable :: a
+ end type
+ class(t) :: x, y ! { dg-error "must be dummy, allocatable or pointer" }
+ y = x ! { dg-error "Nonallocatable variable must not be polymorphic in intrinsic assignment" }
+end