[gfortran] Make all arguments to ENTRY master optional
Tobias Schlüter
tobias.schlueter@physik.uni-muenchen.de
Tue Aug 24 15:32:00 GMT 2004
Steven Bosscher wrote:
> You might want to explain this with a comment in the code.
Like so?
Index: resolve.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/resolve.c,v
retrieving revision 1.13
diff -u -p -r1.13 resolve.c
--- resolve.c 23 Aug 2004 21:53:14 -0000 1.13
+++ resolve.c 24 Aug 2004 15:28:21 -0000
@@ -312,6 +312,10 @@ merge_argument_lists (gfc_symbol *proc,
/* Add a new argument. Argument order is not important. */
new_arglist = gfc_get_formal_arglist ();
new_arglist->sym = new_sym;
+ /* We mark all arguments as optional, since in the common case
+ only a subset of the arguments will be present. This avoids
+ having to special case arguments of master functions later on. */
+ new_arglist->sym->attr.optional = 1;
new_arglist->next = proc->formal;
proc->formal = new_arglist;
}
> And a ChangeLog entry ;-)
Oops, here you are:
2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
* resolve.c (merge_argument_lists): Make all arguments optional.
* trans-array.c (gfc_trans_dummy_array_bias): Remove special handling
for arguments to entry master functions.
* trans-types.c (gfc_sym_type): Same.
- Tobi
More information about the Fortran
mailing list