aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2009-01-04 23:17:37 +0000
committerPaul Thomas <pault@gcc.gnu.org>2009-01-04 23:17:37 +0000
commita1ab6660ae5b348d625af230f78bbe28556b2a45 (patch)
treeb3246ca0a9ecb2c3725a7c60fd783e01c918f445 /gcc/fortran/resolve.c
parentf958e3caa5a1d72b44f5da590624ec4fd86168ec (diff)
downloadgcc-a1ab6660ae5b348d625af230f78bbe28556b2a45.zip
gcc-a1ab6660ae5b348d625af230f78bbe28556b2a45.tar.gz
gcc-a1ab6660ae5b348d625af230f78bbe28556b2a45.tar.bz2
re PR fortran/38665 (ICE in check_host_association)
2009-01-05 Paul Thomas <pault@gcc.gnu.org> PR fortran/38665 * gfortran.h : Add bit to gfc_expr 'user_operator' * interface.c (gfc_extend_expr): Set the above if the operator is substituted by a function. * resolve.c (check_host_association): Return if above is set. 2009-01-05 Paul Thomas <pault@gcc.gnu.org> PR fortran/38665 * gfortran.dg/host_assoc_function_5.f90: New test. From-SVN: r143064
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 27a4d99..74f8fb0 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -4300,7 +4300,12 @@ check_host_association (gfc_expr *e)
int n;
bool retval = e->expr_type == EXPR_FUNCTION;
- if (e->symtree == NULL || e->symtree->n.sym == NULL)
+ /* If the expression is the result of substitution in
+ interface.c(gfc_extend_expr) because there is no way in
+ which the host association can be wrong. */
+ if (e->symtree == NULL
+ || e->symtree->n.sym == NULL
+ || e->user_operator)
return retval;
old_sym = e->symtree->n.sym;
@@ -4336,6 +4341,11 @@ check_host_association (gfc_expr *e)
gfc_free (e->shape);
}
+/* TODO - Replace this gfc_match_rvalue with a straight replacement of
+ actual arglists for function to function substitutions and with a
+ conversion of the reference list to an actual arglist in the case of
+ a variable to function replacement. This should be quite easy since
+ only integers and vectors can be involved. */
gfc_match_rvalue (&expr);
gfc_clear_error ();
gfc_buffer_error (0);