Commit 1a0c6983 by Jerry DeLisle

re PR fortran/61933 (Inquire on internal units)

2015-01-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR target/61933
	* gfortran.dg/inquire_internal.f90: New.
	* gfortran.dg/negative_unit_check.f90: New.

From-SVN: r219632
parent 351b4432
2015-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR target/61933
* gfortran.dg/inquire_internal.f90: New.
* gfortran.dg/negative_unit_check.f90: New.
2015-01-14 Oleg Endo <olegendo@gcc.gnu.org>
PR target/53988
......
! { dg-do run }
! Test case from PR61933.
use iso_fortran_env
logical :: unit_exists
integer :: tunit, istat
istat = 0
tunit=-1 ! Represents an internal unit.
unit_exists = .true.
inquire(unit=tunit, exist=unit_exists, iostat=istat)
!print *, "Error Code is : ", IOSTAT_INQUIRE_INTERNAL_UNIT
!print *, "IOSTAT Code is: ", istat
!print *, tunit, unit_exists
if (istat.ne.iostat_inquire_internal_unit) call abort()
if (unit_exists) call abort()
END
! { dg-do compile }
! Test case from PR61933.
LOGICAL :: file_exists
INQUIRE(UNIT=-1,EXIST=file_exists)! { dg-error "can not be -1" }
END
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment