8sa1-gcc/gcc/testsuite/gfortran.dg/inquire_10.f90
Francois-Xavier Coudert fe046210e2 re PR libfortran/23272 ([mingw32] inquire via filename fails)
PR libfortran/23272

	* io/unix.c (id_from_handle, id_from_path, id_from_fd): New
	functions.
	(compare_file_filename, find_file, find_file0): Use the new
	functions above.

	* gfortran.dg/inquire_10.f90: New test.

From-SVN: r128636
2007-09-20 22:56:48 +00:00

17 lines
378 B
Fortran

character(len=800) :: cwd
integer :: unit
call getcwd(cwd)
open(file='cseq', unit=23)
inquire(file='cseq',number=unit)
if (unit /= 23) call abort
inquire(file=trim(cwd) // '/cseq',number=unit)
if (unit /= 23) call abort
inquire(file='foo/../cseq2',number=unit)
if (unit >= 0) call abort
inquire(file='cseq2',number=unit)
if (unit >= 0) call abort
end