summaryrefslogtreecommitdiffstats
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-09 20:41:51 +0000
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-09 20:41:51 +0000
commit48a3e2a88420ebebe83cb52ecfbb80eb200b7f1d (patch)
treee5890fbc9e14ecf6fff7b0db5962422484988337 /gcc/fortran/resolve.c
parent1c8a300d0b8af51b7ab5c3a4df2b685399dbcd3a (diff)
downloadppe42-gcc-48a3e2a88420ebebe83cb52ecfbb80eb200b7f1d.tar.gz
ppe42-gcc-48a3e2a88420ebebe83cb52ecfbb80eb200b7f1d.zip
2006-12-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29941 * resolve.c (resolve_function): Add LEN to the functions not checked for assumed size actual args. 2006-12-09 Paul Thomas <pault@gcc.gnu.org> PR fortran/29941 * gfortran.dg/assumed_len.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119695 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index e31ecbd5909..863e8319d09 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -1514,19 +1514,21 @@ resolve_function (gfc_expr * expr)
t = FAILURE;
}
+#define GENERIC_ID expr->value.function.isym->generic_id
else if (expr->value.function.actual != NULL
&& expr->value.function.isym != NULL
- && expr->value.function.isym->generic_id != GFC_ISYM_LBOUND
- && expr->value.function.isym->generic_id != GFC_ISYM_LOC
- && expr->value.function.isym->generic_id != GFC_ISYM_PRESENT)
+ && GENERIC_ID != GFC_ISYM_LBOUND
+ && GENERIC_ID != GFC_ISYM_LEN
+ && GENERIC_ID != GFC_ISYM_LOC
+ && GENERIC_ID != GFC_ISYM_PRESENT)
{
/* Array intrinsics must also have the last upper bound of an
assumed size array argument. UBOUND and SIZE have to be
excluded from the check if the second argument is anything
than a constant. */
int inquiry;
- inquiry = expr->value.function.isym->generic_id == GFC_ISYM_UBOUND
- || expr->value.function.isym->generic_id == GFC_ISYM_SIZE;
+ inquiry = GENERIC_ID == GFC_ISYM_UBOUND
+ || GENERIC_ID == GFC_ISYM_SIZE;
for (arg = expr->value.function.actual; arg; arg = arg->next)
{
@@ -1540,6 +1542,7 @@ resolve_function (gfc_expr * expr)
return FAILURE;
}
}
+#undef GENERIC_ID
need_full_assumed_size = temp;
OpenPOWER on IntegriCloud