[Patch, Fortran] PR 50547 / cleanup in resolve_formal_arglist
Janus Weil
janus@gcc.gnu.org
Sat Oct 1 23:43:00 GMT 2011
Hi all,
while working on PR50547, I noticed some strange things about
resolve_formal_arglist, so I decided to clean it up a little. The
attached patch does a couple of things:
(1) It removes an error message ("Unable to find a specific INTRINSIC
procedure...") which simply does not make any sense in
resolve_formal_arglist. There is just no way for procedure dummies to
be intrinsics. "svn blame" claims this code was committed by Paul in
r120296 (for PR27900):
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27900#c12
The error message was added both in resolve_actual_arglist (where it
*does* make sense), and in resolve_formal_arglist (where it doesn't).
(2) The error message "Dummy procedure ... not allowed in ELEMENTAL
procedure" is being thrown in two different places (for
functions/subroutines), which is completely unnecessary. I removed one
of them, and made sure the other is triggered for both cases. Also the
testsuite was missing a test for this case, so I added one.
(3) I reshuffled some of the code dealing with pure procedures, in
order to have it in one place.
(4) I reshuffled some of the code dealing with "attr.implicit_pure",
so that it is not so scattered around and better to understand.
During all the reshuffling I removed an early "continue" for dummy
subroutines, and as a consequence had to deal with (not) setting type
and flavor for subroutines.
Regtested on x86_64-unknown-linux-gnu. Ok for trunk?
Cheers,
Janus
2011-10-02 Janus Weil <janus@gcc.gnu.org>
PR fortran/50547
* resolve.c (resolve_formal_arglist): Remove unneeded error message.
Some reshuffling.
2011-10-02 Janus Weil <janus@gcc.gnu.org>
PR fortran/50547
* gfortran.dg/elemental_args_check_4.f90: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr50547.diff
Type: text/x-diff
Size: 5387 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20111001/89f7c596/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: elemental_args_check_4.f90
Type: text/x-fortran
Size: 298 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20111001/89f7c596/attachment-0001.bin>
More information about the Fortran
mailing list