+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-08 Tobias Burnus <burnus@net-b.de>
PR fortran/27546
- * trans-decl.f90 (gfc_create_module_variable): Allow imported symbols
- in interface bodys in modules.
+ * trans-decl.c (gfc_create_module_variable): Allow imported
+ symbols in interface bodies in modules.
2006-12-06 Tobias Burnus <burnus@net-b.de>
PR fortran/29711
- * error.c (error_print): Fix handling of printf-style position specifiers
- of the form "%3$d"
+ * error.c (error_print): Fix handling of printf-style position
+ specifiers of the form "%3$d".
2006-12-05 Paul Thomas <pault@gcc.gnu.org>
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)
{
return FAILURE;
}
}
+#undef GENERIC_ID
need_full_assumed_size = temp;
+2006-12-09 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/29941
+ * gfortran.dg/assumed_len.f90: New test.
+
2006-12-09 Richard Guenther <rguenther@suse.de>
* g++.dg/warn/implicit-typename1.C: Qualify types.
--- /dev/null
+! { dg-do compile }
+! Test of the patch for PR29941, in which LEN threw an error with
+! an assumed size argument.
+!
+! Contributed by William Mitchell <william.mitchell@nist.gov>
+!
+subroutine whatever(str)
+character(len=*), dimension(*) :: str
+integer :: i
+i = len(str)
+end subroutine whatever