+2006-10-28 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/28224
+ * io.c (check_io_constraints): Allow namelists
+ for internal files for Fortran 2003.
+
2006-10-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/27954
"REC tag at %L is incompatible with internal file",
&dt->rec->where);
- io_constraint (dt->namelist != NULL,
- "Internal file at %L is incompatible with namelist",
- &expr->where);
+ if (dt->namelist != NULL)
+ {
+ if (gfc_notify_std(GFC_STD_F2003,
+ "Internal file at %L is incompatible with namelist",
+ &expr->where) == FAILURE)
+ m = MATCH_ERROR;
+ }
io_constraint (dt->advance != NULL,
"ADVANCE tag at %L is incompatible with internal file",
-2006-10-28 Tobias Burnus <burnus@net-b.de>
+2006-10-28 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/28224
+ * gfortran.dg/io_constraints_2.f90: Use -std=f95.
+ * gfortran.dg/namelist_internal.f90: New test.
+
+2006-10-28 Tobias Burnus <burnus@net-b.de>
PR fortran/29625
* gfortran.dg/io_real_boz.f90: Add.
! { dg-do compile }
+! { dg-options "-std=f95" }
! Part II of the test of the IO constraints patch, which fixes PRs:
! PRs 25053, 25063, 25064, 25066, 25067, 25068, 25069, 25307 and 20862.
! Modified2006-07-08 to check the patch for PR20844.
write(*, NML=NL) z ! { dg-error "followed by IO-list" }
!Was correctly picked up before patch.
- print NL, z ! { dg-error "followed by IO-list" }
+ print NL, z ! { dg-error "PRINT namelist at \\(1\\) is an extension" }
!
! Not allowed with internal unit
!Was correctly picked up before patch.
--- /dev/null
+! { dg-do run }
+! { dg-options "-fall-intrinsics -std=f2003" }
+! Checks internal file read/write of namelists
+! (Fortran 2003 feature)
+! PR fortran/28224
+program nml_internal
+ integer :: i, j
+ real :: r
+ namelist /nam/ i, j, r
+ character(len=250) :: str
+
+ i = 42
+ j = -718
+ r = exp(1.0)
+ write(str,nml=nam)
+ i = -33
+ j = 10
+ r = sin(1.0)
+ read(str,nml=nam)
+ if(i /= 42 .or. j /= -718 .or. abs(r-exp(1.0)) > 1e-5) call abort()
+end program nml_internal