From: JerryD <jvdelisle@charter.net>
To: "fortran@gcc.gnu.org" <fortran@gcc.gnu.org>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: [Patch, libgfortran] Inquire internal unit within child dtio procedure
Date: Wed, 05 Oct 2016 04:50:00 -0000 [thread overview]
Message-ID: <d96e44ae-1bd5-6690-cb68-e9768ea8839b@charter.net> (raw)
Committed as trivial. Reported on c.l.f Regression tested on x86-64.
Regards,
Jerry
2016-10-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
io/inquire.c (inquire_via_unit): Add check for internal unit
passed into child IO procedure.
2016-10-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* gfortran.dg/dtio_15.f90: New test.
r240766 = d59520df9fe83f1a9aea7e766cef52bf6ec790df (refs/remotes/svn/trunk)
A gcc/testsuite/gfortran.dg/dtio_15.f90
M libgfortran/ChangeLog
M libgfortran/io/inquire.c
diff --git a/libgfortran/io/inquire.c b/libgfortran/io/inquire.c
index 2bb518b6..7751b8df 100644
--- a/libgfortran/io/inquire.c
+++ b/libgfortran/io/inquire.c
@@ -41,7 +41,9 @@ inquire_via_unit (st_parameter_inquire *iqp, gfc_unit * u)
const char *p;
GFC_INTEGER_4 cf = iqp->common.flags;
- if (iqp->common.unit == GFC_INTERNAL_UNIT || iqp->common.unit ==
GFC_INTERNAL_UNIT4)
+ if (iqp->common.unit == GFC_INTERNAL_UNIT ||
+ iqp->common.unit == GFC_INTERNAL_UNIT4 ||
+ u->internal_unit_kind != 0)
generate_error (&iqp->common, LIBERROR_INQUIRE_INTERNAL_UNIT, NULL);
if ((cf & IOPARM_INQUIRE_HAS_EXIST) != 0)
next reply other threads:[~2016-10-05 4:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-05 4:50 JerryD [this message]
2016-10-05 13:47 Dominique d'Humières
2016-10-05 14:52 ` Jerry DeLisle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d96e44ae-1bd5-6690-cb68-e9768ea8839b@charter.net \
--to=jvdelisle@charter.net \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).