Commit 89c32b0f by Tobias Burnus Committed by Tobias Burnus

re PR fortran/34654 (no unformatted on internal file)

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/34654
        * gfortran.dg/internal_io_unf.f90: New.

From-SVN: r131350
parent 242633d6
2008-01-06 Tobias Burnus <burnus@net-b.de> 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 PR fortran/34660
* resolve.c (resolve_formal_arglist): Reject dummy procedure in * resolve.c (resolve_formal_arglist): Reject dummy procedure in
ELEMENTAL functions. ELEMENTAL functions.
......
...@@ -2669,6 +2669,11 @@ if (condition) \ ...@@ -2669,6 +2669,11 @@ if (condition) \
"REC tag at %L is incompatible with internal file", "REC tag at %L is incompatible with internal file",
&dt->rec->where); &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 (dt->namelist != NULL)
{ {
if (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: Internal file " if (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: Internal file "
......
2008-01-06 Tobias Burnus <burnus@net-b.de> 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 PR fortran/34660
* gfortran.dg/elemental_args_check_2.f90: New. * gfortran.dg/elemental_args_check_2.f90: New.
! { 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment