Index: gcc/gcc/testsuite/gfortran.dg/namelist_27.f90 |
diff --git a/gcc/gcc/testsuite/gfortran.dg/namelist_27.f90 b/gcc/gcc/testsuite/gfortran.dg/namelist_27.f90 |
index e645ca5bc044696bf2fc1a40667765f299bdfc31..06381b116344c8a51db9a64c48194a3be53b3548 100644 |
--- a/gcc/gcc/testsuite/gfortran.dg/namelist_27.f90 |
+++ b/gcc/gcc/testsuite/gfortran.dg/namelist_27.f90 |
@@ -1,4 +1,4 @@ |
-! { dg-do run { target fd_truncate } } |
+! { dg-do run } |
! PR31052 Bad IOSTAT values when readings NAMELISTs past EOF. |
! Patch derived from PR, submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org> |
program gfcbug61 |
@@ -41,14 +41,14 @@ contains |
character(len=*), intent(in) :: name |
character(len=255) :: line |
- integer :: ios, idx |
+ integer :: ios, idx, k |
logical :: first |
first = .true. |
status = 0 |
ios = 0 |
line = "" |
- do |
+ do k=1,10 |
read (unit,'(a)',iostat=ios) line |
if (first) then |
first = .false. |
@@ -74,7 +74,7 @@ contains |
subroutine read_report (unit, status) |
integer :: unit, status |
- integer :: iuse, ios |
+ integer :: iuse, ios, k |
!------------------ |
! Namelist 'REPORT' |
!------------------ |
@@ -85,7 +85,7 @@ contains |
! Loop to read namelist multiple times |
!------------------------------------- |
iuse = 0 |
- do |
+ do k=1,5 |
!---------------------------------------- |
! Preset namelist variables with defaults |
!---------------------------------------- |
@@ -103,4 +103,4 @@ contains |
status = ios |
end subroutine read_report |
-end program gfcbug61 |
+end program gfcbug61 |