diff options
author | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-09-26 11:15:23 +0000 |
---|---|---|
committer | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-09-26 11:15:23 +0000 |
commit | 201cefd51e532e65e8e18ceb821eacf829d375f1 (patch) | |
tree | 3f4e6b9ce013aac66a384abedf9c3d3d5d3f9990 /gcc/fortran/interface.c | |
parent | 925add3b860b09960735cac1509285412a7712b4 (diff) |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240493 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r-- | gcc/fortran/interface.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 9a19fa731b0c..9a0ccf811851 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) { |