aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/io/inquire.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/libgfortran/io/inquire.c b/libgfortran/io/inquire.c
index 547b831..b1f4a14 100644
--- a/libgfortran/io/inquire.c
+++ b/libgfortran/io/inquire.c
@@ -47,17 +47,7 @@ inquire_via_unit (st_parameter_inquire *iqp, gfc_unit * u)
GFC_INTEGER_4 cf = iqp->common.flags;
if ((cf & IOPARM_INQUIRE_HAS_EXIST) != 0)
- {
- *iqp->exist = (iqp->common.unit >= 0
- && iqp->common.unit <= GFC_INTEGER_4_HUGE);
-
- if ((cf & IOPARM_INQUIRE_HAS_FILE) == 0)
- {
- if (!(*iqp->exist))
- *iqp->common.iostat = ERROR_BAD_UNIT;
- *iqp->exist = *iqp->exist && (*iqp->common.iostat != ERROR_BAD_UNIT);
- }
- }
+ *iqp->exist = iqp->common.unit >= 0;
if ((cf & IOPARM_INQUIRE_HAS_OPENED) != 0)
*iqp->opened = (u != NULL);