diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-02-10 16:48:24 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-02-10 16:48:24 +0000 |
commit | 22c1d3019e6a942f8f11eb6cb3ec036343e8b6e3 (patch) | |
tree | b6a7bb8f5481310a105cb032a2302d44b7be6d30 /gcc/fortran/decl.c | |
parent | c1630d65d745a592779683d793933220559986d9 (diff) | |
download | gcc-22c1d3019e6a942f8f11eb6cb3ec036343e8b6e3.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156665 138bc75d-0d04-0410-961f-82ee72b054a4
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 015d6a4ef94..82c67ae0045 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; |