This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]