fortran/
PR fortran/15211
* trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
of strings.
testsuite/
PR fortran/15211
* gfortran.fortran-torture/execute/intrinsic_len.f90: Also test
LEN of a character array.
From-SVN: r83126
+2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
+
+ PR fortran/15211
+ * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
+ of strings.
+
2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/15510
break;
default:
- if (arg->expr_type == EXPR_VARIABLE && arg->ref == NULL)
+ if (arg->expr_type == EXPR_VARIABLE && arg->ref == NULL
+ || (arg->ref->next == NULL && arg->ref->type == REF_ARRAY))
{
+ /* This doesn't catch all cases.
+ See http://gcc.gnu.org/ml/fortran/2004-06/msg00165.html
+ and the surrounding thread. */
sym = arg->symtree->n.sym;
decl = gfc_get_symbol_decl (sym);
if (decl == current_function_decl && sym->attr.function
+2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
+
+ PR fortran/15211
+ * gfortran.fortran-torture/execute/intrinsic_len.f90: Also test
+ LEN of a character array.
+
2004-06-14 Mark Mitchell <mark@codesourcery.com>
PR c++/15096
if ((a .ne. "01234567") .or. (n .ne. 8)) call abort
if (len(Tom%name) .ne. 10) call abort
+ call array_test()
end
function w(i)
w = "01234567"
i = len(w)
end
+
+! This is the testcase from PR 15211 converted to a subroutine
+subroutine array_test
+ implicit none
+ character(len=10) a(4)
+ if (len(a) .NE. 10) call abort()
+end subroutine array_test
+