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:
parent
242633d6ea
commit
89c32b0f91
@ -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
|
||||
|
@ -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 "
|
||||
|
@ -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
|
||||
|
11
gcc/testsuite/gfortran.dg/internal_io_unf.f90
Normal file
11
gcc/testsuite/gfortran.dg/internal_io_unf.f90
Normal 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
|
Loading…
Reference in New Issue
Block a user