This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix fortran/PR20846 "inquire(FILE=..., UNIT=...) not flagged as error"
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: GCC patches <gcc-patches at gcc dot gnu dot org>, GNU GFortran <fortran at gcc dot gnu dot org>
- Date: Tue, 24 May 2005 11:28:37 -0700
- Subject: Re: [PATCH] Fix fortran/PR20846 "inquire(FILE=..., UNIT=...) not flagged as error"
- References: <20050524180210.GA20504@vipunen.hut.fi>
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