primary.c (gfc_match_rvalue): Handle ENTRY the same way as FUNCTION.
* primary.c (gfc_match_rvalue): Handle ENTRY the same way as FUNCTION. * gfortran.fortran-torture/execute/entry_10.f90: New test. From-SVN: r101758
This commit is contained in:
parent
29f9d52d10
commit
0921bc44f7
|
@ -1,3 +1,8 @@
|
||||||
|
2005-07-08 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* primary.c (gfc_match_rvalue): Handle ENTRY the same way
|
||||||
|
as FUNCTION.
|
||||||
|
|
||||||
2005-07-07 Jakub Jelinek <jakub@redhat.com>
|
2005-07-07 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* scanner.c (load_line): Add pbuflen argument, don't make
|
* scanner.c (load_line): Add pbuflen argument, don't make
|
||||||
|
|
|
@ -1846,11 +1846,24 @@ gfc_match_rvalue (gfc_expr ** result)
|
||||||
|
|
||||||
gfc_set_sym_referenced (sym);
|
gfc_set_sym_referenced (sym);
|
||||||
|
|
||||||
if (sym->attr.function && sym->result == sym
|
if (sym->attr.function && sym->result == sym)
|
||||||
&& (gfc_current_ns->proc_name == sym
|
{
|
||||||
|
if (gfc_current_ns->proc_name == sym
|
||||||
|| (gfc_current_ns->parent != NULL
|
|| (gfc_current_ns->parent != NULL
|
||||||
&& gfc_current_ns->parent->proc_name == sym)))
|
&& gfc_current_ns->parent->proc_name == sym))
|
||||||
goto variable;
|
goto variable;
|
||||||
|
|
||||||
|
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)
|
||||||
|
goto variable;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (sym->attr.function || sym->attr.external || sym->attr.intrinsic)
|
if (sym->attr.function || sym->attr.external || sym->attr.intrinsic)
|
||||||
goto function0;
|
goto function0;
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2005-07-08 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* gfortran.fortran-torture/execute/entry_10.f90: New test.
|
||||||
|
|
||||||
2005-07-07 Geoffrey Keating <geoffk@apple.com>
|
2005-07-07 Geoffrey Keating <geoffk@apple.com>
|
||||||
|
|
||||||
* gcc.dg/darwin-version-1.c: New.
|
* gcc.dg/darwin-version-1.c: New.
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
function foo ()
|
||||||
|
foo = 4
|
||||||
|
foo = foo / 2
|
||||||
|
return
|
||||||
|
entry bar ()
|
||||||
|
bar = 9
|
||||||
|
bar = bar / 3
|
||||||
|
end
|
||||||
|
|
||||||
|
program entrytest
|
||||||
|
if (foo () .ne. 2) call abort ()
|
||||||
|
if (bar () .ne. 3) call abort ()
|
||||||
|
end
|
Loading…
Reference in New Issue