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] Support ENTRY in FUNCTIONs (PR fortran/13082) (take 3)


> Below is updated patch, that incorporates your comments, add a gfortran.dg
> testcase for the cases where gfortran should issue errors and fixes a bug
> with entries/functions with implicit types (the only changes are in
> resolve.c and testcases).
>...

+/* The namespace of the current function.  */
+extern gfc_namespace *current_function_namespace;

This should not be necessary. You can get to this from the symbol. 
sym->ns in most cases, sym->formal_ns for the original function symbol.
For functions I think you want sym->formal_ns. For entries I think it's 
sym->ns.

--- gcc/fortran/trans-array.c.jj        2005-03-25 11:37:26.000000000 +0100
+++ gcc/fortran/trans-array.c   2005-04-25 16:04:45.000000000 +0200
@@ -3373,7 +3373,7 @@ gfc_trans_dummy_array_bias (gfc_symbol *
 
   /* Only do the entry/initialization code if the arg is present.  */
   dumdesc = GFC_DECL_SAVED_DESCRIPTOR (tmpdesc);
-  optional_arg = sym->attr.optional || sym->ns->proc_name->attr.entry_master;
+  optional_arg = sym->attr.optional;

This is wrong. I just committed a testcase for this (entry_3.f90).

Paul


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