aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/transfer.c
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2013-12-17 03:06:04 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2013-12-17 03:06:04 +0000
commit1ede59e4c72ec83a3382e5ca5f4779c819977a8c (patch)
treeec8d3e6892e8fe0b968cd1630db981e970c6a72e /libgfortran/io/transfer.c
parent01d90185267d21a6f7c9a97722c1c71b3f1139dd (diff)
downloadgcc-1ede59e4c72ec83a3382e5ca5f4779c819977a8c.zip
gcc-1ede59e4c72ec83a3382e5ca5f4779c819977a8c.tar.gz
gcc-1ede59e4c72ec83a3382e5ca5f4779c819977a8c.tar.bz2
re PR libfortran/59419 (Failing OPEN with FILE='xxx' and IOSTAT creates the file 'xxx' after revision 196783)
2013-12-16 Jerry DeLisle <jvdelisle@gcc.gnu> PR libfortran/59419 * io/file_pos.c (st_rewind): Do proper return after generate_error. * io/open.c (edit_modes): Move action code inside block that checks for library ok. (new_unit): Do cleanup after error. (st_open): Do proper return after error. * io/transfer.c (data_transfer_init): Likewise. From-SVN: r206039
Diffstat (limited to 'libgfortran/io/transfer.c')
-rw-r--r--libgfortran/io/transfer.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index 0b1540c..85003cc 100644
--- a/libgfortran/io/transfer.c
+++ b/libgfortran/io/transfer.c
@@ -2490,14 +2490,18 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag)
if ((cf & IOPARM_DT_HAS_NAMELIST_NAME) != 0 && dtp->u.p.ionml != NULL)
{
if ((cf & IOPARM_DT_HAS_FORMAT) != 0)
- generate_error (&dtp->common, LIBERROR_OPTION_CONFLICT,
- "A format cannot be specified with a namelist");
+ {
+ generate_error (&dtp->common, LIBERROR_OPTION_CONFLICT,
+ "A format cannot be specified with a namelist");
+ return;
+ }
}
else if (dtp->u.p.current_unit->flags.form == FORM_FORMATTED &&
!(cf & (IOPARM_DT_HAS_FORMAT | IOPARM_DT_LIST_FORMAT)))
{
generate_error (&dtp->common, LIBERROR_OPTION_CONFLICT,
"Missing format for FORMATTED data transfer");
+ return;
}
if (is_internal_unit (dtp)