PR fortran/34654
* io.c (check_io_constraints): Disallow unformatted I/O for
internal units.
2008-01-06 Tobias Burnus <burnus@net-b.de>
PR fortran/34654
* gfortran.dg/internal_io_unf.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131350
138bc75d-0d04-0410-961f-
82ee72b054a4
2008-01-06 Tobias Burnus <burnus@net-b.de>
+ PR fortran/34654
+ * io.c (check_io_constraints): Disallow unformatted I/O for
+ internal units.
+
+2008-01-06 Tobias Burnus <burnus@net-b.de>
+
PR fortran/34660
* resolve.c (resolve_formal_arglist): Reject dummy procedure in
ELEMENTAL functions.
"REC tag at %L is incompatible with internal file",
&dt->rec->where);
+ io_constraint (dt->format_expr == NULL && dt->format_label == NULL
+ && dt->namelist == NULL,
+ "Unformatted I/O not allowed with internal unit at %L",
+ &dt->io_unit->where);
+
if (dt->namelist != NULL)
{
if (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: Internal file "
2008-01-06 Tobias Burnus <burnus@net-b.de>
+ PR fortran/34654
+ * gfortran.dg/internal_io_unf.f90: New.
+
+2008-01-06 Tobias Burnus <burnus@net-b.de>
+
PR fortran/34660
* gfortran.dg/elemental_args_check_2.f90: New.
--- /dev/null
+! { dg-do compile }
+!
+! PR fortran/34654
+!
+! Disallow unformatted write to internal unit.
+! Test case was contributed by Joost VandeVondele.
+!
+implicit none
+CHARACTER :: a(3)
+WRITE(a) 0 ! { dg-error "Unformatted I/O not allowed with internal unit" }
+END