summaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorjanus <janus@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-09 22:59:02 +0000
committerjanus <janus@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-09 22:59:02 +0000
commitc6337549cc49694cebd36c1630838c7e406bc0f7 (patch)
tree4dbcd292234b1adc3e966a8f6d085fca8d3f5686 /gcc/fortran
parent2b0adbff36b720ae3b0faa9ac42f7895ecf601e1 (diff)
downloadgcc-c6337549cc49694cebd36c1630838c7e406bc0f7.tar.gz
2011-02-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/47352 * resolve.c (resolve_procedure_interface): If interface has a result variable, copy the typespec and set result pointer to self. 2011-02-09 Janus Weil <janus@gcc.gnu.org> PR fortran/47352 * gfortran.dg/proc_decl_25.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169987 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/resolve.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 6475d5eaf8b..80cc4da5d80 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,11 @@
2011-02-09 Janus Weil <janus@gcc.gnu.org>
+ PR fortran/47352
+ * resolve.c (resolve_procedure_interface): If interface has a result
+ variable, copy the typespec and set result pointer to self.
+
+2011-02-09 Janus Weil <janus@gcc.gnu.org>
+
PR fortran/47463
* resolve.c (resolve_typebound_subroutine): Remove erroneous line.
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 688967a99d1..0fe067290d6 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -160,7 +160,10 @@ resolve_procedure_interface (gfc_symbol *sym)
resolve_intrinsic (ifc, &ifc->declared_at);
if (ifc->result)
- sym->ts = ifc->result->ts;
+ {
+ sym->ts = ifc->result->ts;
+ sym->result = sym;
+ }
else
sym->ts = ifc->ts;
sym->ts.interface = ifc;