From: Thomas Koenig Date: Sat, 6 Apr 2019 14:16:01 +0000 (+0000) Subject: re PR fortran/89981 (gfortran -pedantic rejects code in 8.3.1 that is accepted with... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2955784caf887cbc6949b766bc38d6f9e0f3fc48;p=gcc.git re PR fortran/89981 (gfortran -pedantic rejects code in 8.3.1 that is accepted with 8.3.0) 2019-04-06 Thomas Koenig PR fortran/89981 * resolve.c (resolve_global_procedure): If the global symbol is an ENTRY, also look up its name among the entries. 2019-04-06 Thomas Koenig PR fortran/89981 * gfortran.dg/entry_22.f90: New test. From-SVN: r270182 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 7b849b0d3fd..ca1728041c3 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2019-04-06 Thomas Koenig + + PR fortran/89981 + * resolve.c (resolve_global_procedure): If the global symbol is an + ENTRY, also look up its name among the entries. + 2019-04-04 Harald Anlauf PR fortran/89004 diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 3513a44ede3..cb41da08526 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -2546,7 +2546,7 @@ resolve_global_procedure (gfc_symbol *sym, locus *where, if (gsym->binding_label && gsym->sym_name != def_sym->name) gfc_find_symbol (gsym->sym_name, gsym->ns, 0, &def_sym); - if (def_sym->attr.entry_master) + if (def_sym->attr.entry_master || def_sym->attr.entry) { gfc_entry_list *entry; for (entry = gsym->ns->entries; entry; entry = entry->next) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b854b575077..2c8de7a9720 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-04-06 Thomas Koenig + + PR fortran/89981 + * gfortran.dg/entry_22.f90: New test. + 2019-04-05 Marek Polacek PR c++/87145 - bogus error converting class type in template arg list. diff --git a/gcc/testsuite/gfortran.dg/entry_22.f90 b/gcc/testsuite/gfortran.dg/entry_22.f90 new file mode 100644 index 00000000000..7753429d65b --- /dev/null +++ b/gcc/testsuite/gfortran.dg/entry_22.f90 @@ -0,0 +1,12 @@ +! { dg-do compile } +! { dg-additional-options "-pedantic" } +! PR fortran/89981 - this used to give a wrong warning (error with +! -pedantic) +program main + call bar(i) + call baz(i) ! { dg-error "Type mismatch in argument" } +end program main +subroutine foo(r) + entry bar(i) + entry baz(r) +end subroutine foo