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: Janne Blomqvist <jblomqvi at cc dot hut dot fi>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: GCC patches <gcc-patches at gcc dot gnu dot org>, GNU GFortran <fortran at gcc dot gnu dot org>
- Date: Tue, 24 May 2005 23:47:49 +0300
- Subject: Re: [PATCH] Fix fortran/PR20846 "inquire(FILE=..., UNIT=...) not flagged as error"
- References: <20050524180210.GA20504@vipunen.hut.fi> <20050524182837.GA18309@troutmask.apl.washington.edu>
On Tue, May 24, 2005 at 11:28:37AM -0700, Steve Kargl wrote:
> 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?
Nope.
> Also, did you bootstrap/bubblestrap
Just "make && make install". As I didn't touch any headers or such and
the patch is really trivial, I don't think a full rebuild is really
needed. OTOH nowadays I have an A64 that runs gcc 4X faster than my
old comp, so compiling isn't so painful anymore... :-)
> and regression test the patch?
Yup, I ran "make check-f95". The vect-5.f90 test failed, but IIRC it
failed before too and I can't really see why my patch would affect it.
> What about a test case?
I just used the simple one from bugzilla to test without any dejagnu
stuff, e.g.
INQUIRE(FILE="TEST",UNIT=7,RECL=I)
END
> 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
Thanks, I think that one will do nicely.
--
Janne Blomqvist