diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2016-10-05 16:32:24 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2016-10-05 16:32:24 +0000 |
commit | a40278c3e39a5ef2a35a0f8c4e6ce359c9af9832 (patch) | |
tree | e9f55a185d17abdba2cce6a575f56a47f70d5f69 /libgfortran/io | |
parent | 73e1414cb829d02baef1bf241d4bdf3805f6f724 (diff) | |
download | gcc-a40278c3e39a5ef2a35a0f8c4e6ce359c9af9832.zip gcc-a40278c3e39a5ef2a35a0f8c4e6ce359c9af9832.tar.gz gcc-a40278c3e39a5ef2a35a0f8c4e6ce359c9af9832.tar.bz2 |
re PR libfortran/77868 (Fail to NULL guard check for internal unit in inquire_via_unit)
2016-10-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/77868
* io/inquire.c (inquire_via_unit): NULL guard the check for
internal unit passed into child IO procedure.
* gfortran.dg/dtio_15.f90: Fix spaces in dg-do.
* gfortran.dg/class_array_20.f03: Likewise.
* gfortran.dg/class_array_21.f03: Likewise.
* gfortran.dg/finalize_29.f08: Likewise.
* gfortran.dg/unlimited_polymorphic_23.f90: Likewise.
From-SVN: r240794
Diffstat (limited to 'libgfortran/io')
-rw-r--r-- | libgfortran/io/inquire.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgfortran/io/inquire.c b/libgfortran/io/inquire.c index 7751b8d..7e663130e 100644 --- a/libgfortran/io/inquire.c +++ b/libgfortran/io/inquire.c @@ -43,7 +43,7 @@ inquire_via_unit (st_parameter_inquire *iqp, gfc_unit * u) if (iqp->common.unit == GFC_INTERNAL_UNIT || iqp->common.unit == GFC_INTERNAL_UNIT4 || - u->internal_unit_kind != 0) + (u != NULL && u->internal_unit_kind != 0)) generate_error (&iqp->common, LIBERROR_INQUIRE_INTERNAL_UNIT, NULL); if ((cf & IOPARM_INQUIRE_HAS_EXIST) != 0) |