[Patch, Fortran] Check arguments of elemental intrinsic subroutines for conformance
Daniel Kraft
d@domob.eu
Thu Oct 16 11:09:00 GMT 2008
Hi,
while working on PR 35681, I looked at the accepts-invalid mentioned by
FX in comment #1. In short, the arguments for a call to MVBITS were not
checked for conformance, and thus a call with differently shaped
arguments for IN and OUT was accepted.
The problem here is that check_elemental_actual in resolve.c did for
subroutine calls not look at c->resolved_sym and thus missed this call
was actually to an elemental procedure, as the elemental-flag is only
set on resolved_sym during resolution and not on the original symtree.
This patch fixes it.
For elemental functions, it seems that the conformance check is (also)
done in check.c and nothing has to be done here for them (it already
works); it would probably be nicer to do the check for them also only in
one place and not a second time (?) in check_elemental_actual, but I
think it's also quite fine as it is now. This patch is
regression-testing at the moment, but I don't expect any (did one
already and fixed the few failures by a simple modification).
Is it ok if no regressions occur? What do you think, should I commit
now and work then on the "real" part of PR 35681 or should I try to do
both in a single larger patch? I'm fine with both options, although I
don't expect that there's a significant "dependance" of both problems,
so seperate patches seem totally fine.
Cheers,
Daniel
--
Done: Arc-Bar-Cav-Rog-Sam-Val-Wiz
To go: Hea-Kni-Mon-Pri-Ran-Tou
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.changelog
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20081016/a67c4501/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20081016/a67c4501/attachment-0001.ksh>
More information about the Fortran
mailing list