Commit a34437a1 by Paul Thomas

re PR fortran/31630 (ICE on nasty derived types code)

2007-05-08  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/31630
	* resolve.c (resolve_symbol): Remove the flagging mechanism from the
	formal namespace resolution and instead check that the formal
	namespace is not the current namespace.

From-SVN: r124550
parent b2b247f9
2007-05-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31630
* resolve.c (resolve_symbol): Remove the flagging mechanism from the
formal namespace resolution and instead check that the formal
namespace is not the current namespace.
2007-05-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31692
* trans-array.c (gfc_conv_array_parameter): Convert full array
references to the result of the procedure enclusing the call.
......
......@@ -6136,9 +6136,7 @@ resolve_fl_parameter (gfc_symbol *sym)
static void
resolve_symbol (gfc_symbol *sym)
{
/* Zero if we are checking a formal namespace. */
static int formal_ns_flag = 1;
int formal_ns_save, check_constant, mp_flag;
int check_constant, mp_flag;
gfc_symtree *symtree;
gfc_symtree *this_symtree;
gfc_namespace *ns;
......@@ -6345,18 +6343,9 @@ resolve_symbol (gfc_symbol *sym)
formal_arg_flag = 0;
/* Resolve formal namespaces. The symbols in formal namespaces that
themselves are from procedures in formal namespaces will not stand
resolution, except when they are use associated.
TODO: Fix the symbols in formal namespaces so that resolution can
be done unconditionally. */
if (formal_ns_flag && sym != NULL && sym->formal_ns != NULL)
{
formal_ns_save = formal_ns_flag;
formal_ns_flag = sym->attr.use_assoc ? 1 : 0;
/* Resolve formal namespaces. */
if (sym->formal_ns && sym->formal_ns != gfc_current_ns)
gfc_resolve (sym->formal_ns);
formal_ns_flag = formal_ns_save;
}
/* Check threadprivate restrictions. */
if (sym->attr.threadprivate && !sym->attr.save
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment