2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / dev_null.F90
blob2385e19ee6c7fe63b4629e1b3ad2e92591052eaa
1 ! { dg-do run }
2 ! pr19478 read from /dev/null
3 ! Thomas.Koenig@online.de
4 #if defined  _WIN32
5 #define DEV_NULL "nul"
6 #else
7 #define DEV_NULL "/dev/null"
8 #endif
9       character*20 foo
10       open(10,file=DEV_NULL)
11       write(10,'(A)') "Hello"
12       rewind(10)
13       read(10,'(A)',end=100) foo
14       call abort
15  100  continue
16       end