1! { dg-do compile } 2! fortran/pr20846 3program inquire_8 4 character(len=20) :: n = 'data' 5 integer :: d = 23 6 logical a 7 inquire(file=n,unit=d,opened=a) ! { dg-error "contain both FILE and UNIT" } 8 inquire(unit=d,file=n,opened=a) ! { dg-error "contain both FILE and UNIT" } 9 inquire(opened=a) ! { dg-error "requires either FILE or UNIT" } 10end program inquire_8 11