aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-array.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2011-12-15 20:51:19 +0000
committerPaul Thomas <pault@gcc.gnu.org>2011-12-15 20:51:19 +0000
commit1b26c26bb0a5843f1ecb5b490622ee2d09e980fd (patch)
tree5c301268e71763607d00b663bac4776dc0c0f439 /gcc/fortran/trans-array.c
parent363477c0bd7f45f44c3ec6207223c8e1e12d1e1a (diff)
downloadgcc-1b26c26bb0a5843f1ecb5b490622ee2d09e980fd.zip
gcc-1b26c26bb0a5843f1ecb5b490622ee2d09e980fd.tar.gz
gcc-1b26c26bb0a5843f1ecb5b490622ee2d09e980fd.tar.bz2
trans-expr.c (gfc_walk_function_expr): Detect elemental procedure components as well as elemental procedures.
2011-12-15 Paul Thomas <pault@gcc.gnu.org> * trans-expr.c (gfc_walk_function_expr): Detect elemental procedure components as well as elemental procedures. * trans-array.c (gfc_conv_procedure_call): Ditto. * trans-decl.c (gfc_trans_deferred_vars): Correct erroneous break for class pointers to continue. 2011-12-15 Paul Thomas <pault@gcc.gnu.org> * gfortran.dg/class_array_3.f03: Remove explicit indexing of A%disp() to use scalarizer. * gfortran.dg/class_array_9.f03: New. From-SVN: r182389
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r--gcc/fortran/trans-array.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index d441102..a644312 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -8358,7 +8358,7 @@ gfc_walk_function_expr (gfc_ss * ss, gfc_expr * expr)
sym = expr->value.function.esym;
if (!sym)
- sym = expr->symtree->n.sym;
+ sym = expr->symtree->n.sym;
/* A function that returns arrays. */
gfc_is_proc_ptr_comp (expr, &comp);
@@ -8368,7 +8368,7 @@ gfc_walk_function_expr (gfc_ss * ss, gfc_expr * expr)
/* Walk the parameters of an elemental function. For now we always pass
by reference. */
- if (sym->attr.elemental)
+ if (sym->attr.elemental || (comp && comp->attr.elemental))
return gfc_walk_elemental_function_args (ss, expr->value.function.actual,
GFC_SS_REFERENCE);