+2019-05-15 Janne Blomqvist <jb@gcc.gnu.org>
+
+ PR fortran/90461
+ * gfortran.dg/open_errors_2.f90: Add -std=f2008, adjust line number.
+ * gfortran.dg/open_errors_3.f90: New test.
+
2019-05-15 H.J. Lu <hongjiu.lu@intel.com>
PR target/89021
! { dg-do run }
+! { dg-options "-std=f2008" }
! { dg-shouldfail "runtime error" }
-! { dg-output "At line 13.*File already opened" }
+! { dg-output "At line 14.*File already opened" }
! PR 65563 - this used to segfault for some versions.
variable_1 = 0
--- /dev/null
+! { dg-do run }
+! PR 90461 Open file on multiple units as of F2018
+program openmult
+ implicit none
+ character(len=*), parameter :: fname="pr90461.dat"
+ open(10, file=fname, form="unformatted")
+ open(11, file=fname, form="unformatted")
+ close(11)
+ close(10, status="delete")
+end program openmult
+! { dg-final { remote_file build delete "pr90461.dat" } }
+2019-05-15 Janne Blomqvist <jb@gcc.gnu.org>
+
+ PR fortran/90461
+ * io/open.c (new_unit): Don't check if the file is already open
+ for F2018.
+
2019-05-02 Jakub Jelinek <jakub@redhat.com>
* Makefile.am (gfor_cdir): Remove $(MULTISUBDIR).
Do not error if opening file preconnected to stdin, stdout, stderr. */
u2 = NULL;
- if ((opp->common.flags & IOPARM_OPEN_HAS_FILE) != 0)
+ if ((opp->common.flags & IOPARM_OPEN_HAS_FILE) != 0
+ && !(compile_options.allow_std & GFC_STD_F2018))
u2 = find_file (opp->file, opp->file_len);
if (u2 != NULL
&& (options.stdin_unit < 0 || u2->unit_number != options.stdin_unit)