[PATCH] fortran/20869 -- INTRINSIC and EXTERNAL conflict
Steve Kargl
sgk@troutmask.apl.washington.edu
Tue Jan 17 06:39:00 GMT 2006
On Tue, Jan 17, 2006 at 06:53:11AM +0100, Paul Thomas wrote:
> Steve,
>
> >The attached has been bootstrapped and regression tested on
> >i386-*-freebsd. There were no new regression. Unless someone
> >objects, I'll commit the patch to trunk and mainline tomorrow.
> >
> >2006-01-16 Steven G. Kargl <kargls@comcast.net>
> >
> > PR fortran/20869
> > * resolve.c (resolve_symbol): Check for EXTERNAL and INTRINSIC
> > conflict.
> > * gfortran.dg/intrinsic_external.f90: New test.
> >
> symbol.c(check_conflict) already contains a test for EXTERNAL/INTRINSIC
> clashes. From a very quick look, something is very wrong with the
> matching of EXTERNAL and INTRINSIC. None of the checking invoked by
> decl.c(gfc_match_intrinsic, gfc_match_external) seems to be done at all
> - for example, USE association is not picked up.
gfc_match_intrinsic and gfc_match_external work for attributes
in a single statement, ie.,
real, intrinsic, external :: x
will trigger an error. OTOH, the INTRINSIC and EXTERNAL statements
do not (apparently) go through the check_conflict routine. I spent
a few hours today trying to see how these statements work and simply
haven't figured out how either is parsed with respect to setting
the attributes.
> It seems to me that resolve.c is the wrong place for checking the
> atrributes of the same symbol; especially, when this is, in principle,
> already done for you.
Well, it is obviously not done for us, or I won't have added the
code to resolve.c :-) I'll look at it some more tomorrow. Time for
some sleep.
--
Steve
More information about the Gcc-patches
mailing list