Index: gcc/gcc/testsuite/gfortran.dg/namelist_28.f90 |
diff --git a/gcc/gcc/testsuite/gfortran.dg/namelist_28.f90 b/gcc/gcc/testsuite/gfortran.dg/namelist_28.f90 |
index 09015d56e63a7b579e7096dd9a8a7fd9fc97239b..22bddf662390bce04c03256ac73f883b0fcbd279 100644 |
--- a/gcc/gcc/testsuite/gfortran.dg/namelist_28.f90 |
+++ b/gcc/gcc/testsuite/gfortran.dg/namelist_28.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 |
@@ -27,12 +27,12 @@ contains |
character(len=*), intent(in) :: name |
character(len=255) :: line |
- integer :: ios, idx |
+ integer :: ios, idx, k |
logical :: first |
first = .true. |
status = 0 |
- do |
+ do k=1,25 |
line = "" |
read (unit,'(a)',iostat=ios) line |
if (ios < 0) then |
@@ -51,12 +51,13 @@ contains |
return |
end if |
end do |
+ if (k.gt.10) call abort |
end subroutine position_nml |
subroutine read_report (unit, status) |
integer :: unit, status |
- integer :: iuse, ios |
+ integer :: iuse, ios, k |
!------------------ |
! Namelist 'REPORT' |
!------------------ |
@@ -66,7 +67,7 @@ contains |
! Loop to read namelist multiple times |
!------------------------------------- |
iuse = 0 |
- do |
+ do k=1,25 |
!---------------------------------------- |
! Preset namelist variables with defaults |
!---------------------------------------- |
@@ -84,6 +85,7 @@ contains |
if (ios /= 0) exit |
iuse = iuse + 1 |
end do |
+ if (k.gt.10) call abort |
status = ios |
end subroutine read_report |