reflect: canonicalize types returned by StructOf() and friends
[official-gcc.git] / gcc / testsuite / gfortran.dg / filename_null.f90
blob0bd09f63f3ffe3cd5ef4258fd486e75d8bdf791e
1 ! { dg-do run }
2 ! PR 62768
3 ! Filenames with embedded NULL characters are truncated, make sure
4 ! inquire reports the correct truncated name.
5 program filename_null
6 implicit none
7 character(len=15), parameter :: s = "hello" // achar(0) // "world", &
8 s2 = "hello"
9 character(len=15) :: r
10 logical :: l
11 open(10, file=s)
12 inquire(unit=10, name=r)
13 if (r /= s2) STOP 1
14 inquire(file=s2, exist=l)
15 if (.not. l) STOP 2
16 close(10, status="delete")
17 end program filename_null