diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2006-05-07 05:46:26 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2006-05-07 05:46:26 +0000 |
commit | 636da744bb32d4679fac4cfc36670899a4408ff1 (patch) | |
tree | bf7e4cc8a301ceceaa53277106c44b7e8f95534e /gcc/fortran/trans-intrinsic.c | |
parent | 8f9886536fb02c6711e4cc8be068e3938f3a4775 (diff) | |
download | gcc-636da744bb32d4679fac4cfc36670899a4408ff1.zip gcc-636da744bb32d4679fac4cfc36670899a4408ff1.tar.gz gcc-636da744bb32d4679fac4cfc36670899a4408ff1.tar.bz2 |
re PR fortran/24813 (ICE with scalarization LEN of character types)
2006-05-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24813
* trans-array.c (get_array_ctor_strlen): Remove static attribute.
* trans.h: Add prototype for get_array_ctor_strlen.
* trans-intrinsic.c (gfc_conv_intrinsic_len): Switch on EXPR_ARRAY
and call get_array_ctor_strlen.
2006-05-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24813
* gfortran.dg/char_cons_len_1.f90: New test.
From-SVN: r113594
Diffstat (limited to 'gcc/fortran/trans-intrinsic.c')
-rw-r--r-- | gcc/fortran/trans-intrinsic.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index 1abc79a..eb5286e 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -2258,6 +2258,13 @@ gfc_conv_intrinsic_len (gfc_se * se, gfc_expr * expr) len = build_int_cst (NULL_TREE, arg->value.character.length); break; + case EXPR_ARRAY: + /* Obtain the string length from the function used by + trans-array.c(gfc_trans_array_constructor). */ + len = NULL_TREE; + get_array_ctor_strlen (arg->value.constructor, &len); + break; + default: if (arg->expr_type == EXPR_VARIABLE && (arg->ref == NULL || (arg->ref->next == NULL |