diff options
author | Tobias Burnus <burnus@gcc.gnu.org> | 2010-02-10 17:48:24 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2010-02-10 17:48:24 +0100 |
commit | 7fcd5ad54c243aa68714f9d9dad96c428b50f266 (patch) | |
tree | b6a7bb8f5481310a105cb032a2302d44b7be6d30 /gcc/fortran/decl.c | |
parent | 975d3303cc10d90d73d3e9344fe3765ca7e9efa2 (diff) | |
download | gcc-7fcd5ad54c243aa68714f9d9dad96c428b50f266.zip gcc-7fcd5ad54c243aa68714f9d9dad96c428b50f266.tar.gz gcc-7fcd5ad54c243aa68714f9d9dad96c428b50f266.tar.bz2 |
[multiple changes]
2010-02-10 Joost VandeVondele <jv244@cam.ac.uk>
Tobias Burnus <burnus@net-b.de>
PR fortran/40823
* decl.c (gfc_match_subroutine): Explicitly set
* sym->declared_at.
2010-02-10 Tobias Burnus <burnus@net-b.de>
PR fortran/40823
* gfortran.dg/private_type_1.f90: Update error location.
* gfortran.dg/invalid_interface_assignment.f90: Ditto.
* gfortran.dg/typebound_operator_2.f03: Ditto.
* gfortran.dg/assignment_2.f90: Ditto.
* gfortran.dg/redefined_intrinsic_assignment.f90: Ditto.
* gfortran.dg/binding_label_tests_9.f03: Ditto.
From-SVN: r156665
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r-- | gcc/fortran/decl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 015d6a4..82c67ae 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -1,5 +1,5 @@ /* Declaration statement matcher - Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008, 2009 + Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Contributed by Andy Vaught @@ -5100,6 +5100,10 @@ gfc_match_subroutine (void) if (get_proc_name (name, &sym, false)) return MATCH_ERROR; + /* Set declared_at as it might point to, e.g., a PUBLIC statement, if + the symbol existed before. */ + sym->declared_at = gfc_current_locus; + if (add_hidden_procptr_result (sym) == SUCCESS) sym = sym->result; |