summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/dev_null.F90
blob: b8ba5748593736cf65f034b3cdcd51e55b135e6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! { dg-do run }
! { dg-options "-std=legacy" }
!
! pr19478 read from /dev/null
! Thomas.Koenig@online.de
#if defined  _WIN32
#define DEV_NULL "nul"
#else
#define DEV_NULL "/dev/null"
#endif
      character*20 foo
      open(10,file=DEV_NULL)
      write(10,'(A)') "Hello"
      rewind(10)
      read(10,'(A)',end=100) foo
      call abort
 100  continue
      end