diff options
author | Tobias Burnus <burnus@net-b.de> | 2013-05-20 22:08:05 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2013-05-20 22:08:05 +0200 |
commit | 77f8682b0524f6b534b1da716ee2565757ec7b86 (patch) | |
tree | fc7c0d49f2d0a4562c373f1fa4ca56994cf1ea43 /gcc/fortran/parse.c | |
parent | f11de7c5f898a5a613f7ccb47f999312f505f125 (diff) | |
download | gcc-77f8682b0524f6b534b1da716ee2565757ec7b86.zip gcc-77f8682b0524f6b534b1da716ee2565757ec7b86.tar.gz gcc-77f8682b0524f6b534b1da716ee2565757ec7b86.tar.bz2 |
re PR fortran/48858 (Incorrect error for same binding label on two generic interface specifics)
2013-05-20 Tobias Burnus <burnus@net-b.de>
PR fortran/48858
PR fortran/55465
* decl.c (add_global_entry): Add sym_name.
* parse.c (add_global_procedure): Ditto.
* resolve.c (resolve_bind_c_derived_types): Handle multiple decl for
a procedure.
(resolve_global_procedure): Handle gsym->ns pointing to a module.
* trans-decl.c (gfc_get_extern_function_decl): Ditto.
2013-05-20 Tobias Burnus <burnus@net-b.de>
PR fortran/48858
PR fortran/55465
* gfortran.dg/binding_label_tests_10_main.f03: Update dg-error.
* gfortran.dg/binding_label_tests_11_main.f03: Ditto.
* gfortran.dg/binding_label_tests_13_main.f03: Ditto.
* gfortran.dg/binding_label_tests_3.f03: Ditto.
* gfortran.dg/binding_label_tests_4.f03: Ditto.
* gfortran.dg/binding_label_tests_5.f03: Ditto.
* gfortran.dg/binding_label_tests_6.f03: Ditto.
* gfortran.dg/binding_label_tests_7.f03: Ditto.
* gfortran.dg/binding_label_tests_8.f03: Ditto.
* gfortran.dg/c_loc_tests_12.f03: Fix test case.
* gfortran.dg/binding_label_tests_24.f90: New.
* gfortran.dg/binding_label_tests_25.f90: New.
From-SVN: r199120
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r-- | gcc/fortran/parse.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index ba1730a..a223a2c 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -4359,10 +4359,15 @@ add_global_procedure (bool sub) if (s->defined || (s->type != GSYM_UNKNOWN && s->type != (sub ? GSYM_SUBROUTINE : GSYM_FUNCTION))) - gfc_global_used(s, NULL); + { + gfc_global_used (s, NULL); + /* Silence follow-up errors. */ + gfc_new_block->binding_label = NULL; + } else { s->type = sub ? GSYM_SUBROUTINE : GSYM_FUNCTION; + s->sym_name = gfc_new_block->name; s->where = gfc_current_locus; s->defined = 1; s->ns = gfc_current_ns; @@ -4379,10 +4384,15 @@ add_global_procedure (bool sub) if (s->defined || (s->type != GSYM_UNKNOWN && s->type != (sub ? GSYM_SUBROUTINE : GSYM_FUNCTION))) - gfc_global_used(s, NULL); + { + gfc_global_used (s, NULL); + /* Silence follow-up errors. */ + gfc_new_block->binding_label = NULL; + } else { s->type = sub ? GSYM_SUBROUTINE : GSYM_FUNCTION; + s->sym_name = gfc_new_block->name; s->binding_label = gfc_new_block->binding_label; s->where = gfc_current_locus; s->defined = 1; |