+2005-09-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/23663
+ * primary.c (match_actual_arg): Handle ENTRY the same way
+ as FUNCTION.
+
2005-09-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
* Make-lang.in: Make check-fortran alias for check-gfortran.
/* If the symbol is a function with itself as the result and
is being defined, then we have a variable. */
- if (sym->result == sym
- && (gfc_current_ns->proc_name == sym
+ if (sym->attr.function && sym->result == sym)
+ {
+ if (gfc_current_ns->proc_name == sym
|| (gfc_current_ns->parent != NULL
- && gfc_current_ns->parent->proc_name == sym)))
- break;
+ && gfc_current_ns->parent->proc_name == sym))
+ break;
+
+ if (sym->attr.entry
+ && (sym->ns == gfc_current_ns
+ || sym->ns == gfc_current_ns->parent))
+ {
+ gfc_entry_list *el = NULL;
+
+ for (el = sym->ns->entries; el; el = el->next)
+ if (sym == el->sym)
+ break;
+
+ if (el)
+ break;
+ }
+ }
}
e = gfc_get_expr (); /* Leave it unknown for now */
+2005-09-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/23663
+ * gfortran.fortran-torture/execute/entry_11.f90: New test.
+
2005-09-20 Dorit Nuzman <dorit@il.ibm.com>
* gcc.dg/vect/vect-40.c: Remove pointers to "aligned types".
--- /dev/null
+! PR fortran/23663
+ function i (n)
+ i = n
+ i = max (i, 6)
+ return
+ entry j (n)
+ j = n
+ j = max (j, 3)
+ end
+
+ program entrytest
+ if (i (8).ne.8) call abort
+ if (i (4).ne.6) call abort
+ if (j (0).ne.3) call abort
+ if (j (7).ne.7) call abort
+ end