diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2007-08-18 08:34:42 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2007-08-18 08:34:42 +0000 |
commit | 58fbb917c900243b8d3831e70f607ee12db54cbf (patch) | |
tree | b72ad2f3086f63d2bd98f124757c97fdf7373a63 /gcc/fortran/trans-array.c | |
parent | 94cf78d30d6631658b1b90cfca1ae6d60ae7b91f (diff) | |
download | gcc-58fbb917c900243b8d3831e70f607ee12db54cbf.zip gcc-58fbb917c900243b8d3831e70f607ee12db54cbf.tar.gz gcc-58fbb917c900243b8d3831e70f607ee12db54cbf.tar.bz2 |
re PR fortran/32875 (Not Implemented: complex character array constructor)
2007-08-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/32875
* trans-array.c (get_array_ctor_strlen): Set the character
length of a zero length array to zero.
2007-08-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/32875
* gfortran.dg/array_constructor_18.f90: New test.
From-SVN: r127608
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 31d177b..f6b4751 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -1421,6 +1421,13 @@ get_array_ctor_strlen (stmtblock_t *block, gfc_constructor * c, tree * len) bool is_const; is_const = TRUE; + + if (c == NULL) + { + *len = build_int_cstu (gfc_charlen_type_node, 0); + return is_const; + } + for (; c; c = c->next) { switch (c->expr->expr_type) |