[PATCH] Fix fortran/PR20846 "inquire(FILE=..., UNIT=...) not flagged as error"

Steve Kargl sgk@troutmask.apl.washington.edu
Tue May 24 19:28:00 GMT 2005


On Tue, May 24, 2005 at 09:02:11PM +0300, Janne Blomqvist wrote:
> Hello,
> 
> attached patch fixes PR 20846 "inquire(FILE=..., UNIT=...) not flagged
> as error".
> 
> ChangeLog:
> 
> 
>         PR fortran/20846
> 
>         * trans-io.c (gfc_trans_inquire): Add sanity check for UNIT and
>         FILE.
> 
> Patch itself is attached.
> 

Janne,

Do you have write access to cvs?  Also, did you bootstrap/bubblestrap
and regression test the patch?  What about a test case?

I have tested this yet, but here's a potential test.

! { dg-do compile }
program inquire_1
  character(len=20) :: n = 'data'
  integer :: d = 23
  logical a
  inquire(file=n,unit=d,opened=a) ! { dg-error "cannot contain both FILE and UNIT" }
end program inquire_1

-- 
Steve



More information about the Gcc-patches mailing list