diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/fortran/interface.c | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index dee19de..d721bdf 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2016-09-26 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/48298 + * interface.c (gfc_find_specific_dtio_proc) : Return NULL if + the derived type is broken, as indicated by a flavor other than + FL_DERIVED. + 2016-09-26 Marek Polacek <polacek@redhat.com> PR c/7652 @@ -12,7 +19,7 @@ 2016-09-25 Steven G. Kargl <kargl@gcc.gnu.org> - PR fortran/77429 + PR fortran/77429 * dependency.c (gfc_check_dependency): Convert gcc_assert() to a conditional and possible call to gfc_internal_error(). diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 9a19fa7..9a0ccf8 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -4793,6 +4793,9 @@ gfc_find_specific_dtio_proc (gfc_symbol *derived, bool write, bool formatted) gfc_typebound_proc *tb_io_proc, *specific_proc; bool t = false; + if (!derived || derived->attr.flavor != FL_DERIVED) + return NULL; + /* Try to find a typebound DTIO binding. */ if (formatted == true) { |