aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorMikael Morin <mikael@gcc.gnu.org>2013-02-04 18:34:30 +0000
committerMikael Morin <mikael@gcc.gnu.org>2013-02-04 18:34:30 +0000
commit4af8d042f849d47a694edad36c8b1884b938e5d8 (patch)
tree99142281f89b91c3918aa3146078166701eb0c9b /gcc/fortran/resolve.c
parent7ac3af38365579c83426d3d6ddb6c62884d9f5d1 (diff)
downloadgcc-4af8d042f849d47a694edad36c8b1884b938e5d8.zip
gcc-4af8d042f849d47a694edad36c8b1884b938e5d8.tar.gz
gcc-4af8d042f849d47a694edad36c8b1884b938e5d8.tar.bz2
re PR fortran/54107 ([F03] Memory hog with abstract interface)
fortran/ PR fortran/54107 PR fortran/54195 * gfortran.h (struct gfc_symbol): New field 'resolved'. * resolve.c (resolve_fl_var_and_proc): Don't skip result symbols. (resolve_symbol): Skip duplicate calls. Don't check the current namespace. testsuite/ PR fortran/54107 * gfortran.dg/recursive_interface_1.f90: New test. From-SVN: r195729
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index d6bae43..5083a5d 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -11051,11 +11051,6 @@ resolve_fl_var_and_proc (gfc_symbol *sym, int mp_flag)
{
gfc_array_spec *as;
- /* Avoid double diagnostics for function result symbols. */
- if ((sym->result || sym->attr.result) && !sym->attr.dummy
- && (sym->ns != gfc_current_ns))
- return SUCCESS;
-
if (sym->ts.type == BT_CLASS && sym->attr.class_ok)
as = CLASS_DATA (sym)->as;
else
@@ -13170,6 +13165,10 @@ resolve_symbol (gfc_symbol *sym)
gfc_array_spec *as;
bool saved_specification_expr;
+ if (sym->resolved)
+ return;
+ sym->resolved = 1;
+
if (sym->attr.artificial)
return;
@@ -13779,7 +13778,6 @@ resolve_symbol (gfc_symbol *sym)
described in 14.7.5, to those variables that have not already
been assigned one. */
if (sym->ts.type == BT_DERIVED
- && sym->ns == gfc_current_ns
&& !sym->value
&& !sym->attr.allocatable
&& !sym->attr.alloc_comp)