+2018-01-13 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ Backport from mainline
+ PR fortran/78814
+ * interface.c (symbol_rank): Check for NULL pointer.
+
2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
Backport from trunk
/* Deal with interfaces.
- Copyright (C) 2000-2016 Free Software Foundation, Inc.
+ Copyright (C) 2000-2016,2018 Free Software Foundation, Inc.
Contributed by Andy Vaught
This file is part of GCC.
static int
symbol_rank (gfc_symbol *sym)
{
- gfc_array_spec *as;
- as = (sym->ts.type == BT_CLASS) ? CLASS_DATA (sym)->as : sym->as;
+ gfc_array_spec *as = NULL;
+
+ if (sym->ts.type == BT_CLASS && CLASS_DATA (sym) && CLASS_DATA (sym)->as)
+ as = CLASS_DATA (sym)->as;
+ else
+ as = sym->as;
+
return as ? as->rank : 0;
}
+2018-01-13 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ Backport from mainline
+ PR fortran/78814
+ * gfortran.dg/interface_40.f90: New testcase.
+
2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
Backport from trunk