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
This commit is contained in:
Tobias Burnus 2008-01-06 10:21:27 +01:00 committed by Tobias Burnus
parent 242633d6ea
commit 89c32b0f91
4 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,9 @@
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

View File

@ -2669,6 +2669,11 @@ if (condition) \
"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 "

View File

@ -1,3 +1,8 @@
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

View File

@ -0,0 +1,11 @@
! { 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