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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127608
138bc75d-0d04-0410-961f-
82ee72b054a4
+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-16 Tobias Burnus <burnus@net-b.de>
PR fortran/33072
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)
+2007-08-18 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/32875
+ * gfortran.dg/array_constructor_18.f90: New test.
+
2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR c++/28989
--- /dev/null
+! { dg-do compile }
+! Tests the fix for PR32875, in which the character length for the
+! array constructor would get lost in simplification and would lead
+! the error 'Not Implemented: complex character array constructor'.
+!
+! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
+!
+ call foo ((/(S1(i),i=1,3,-1)/))
+CONTAINS
+ FUNCTION S1(i)
+ CHARACTER(LEN=1) :: S1
+ INTEGER :: I
+ S1="123456789"(i:i)
+ END FUNCTION S1
+ subroutine foo (chr)
+ character(1) :: chr(:)
+ print *, chr
+ end subroutine
+END