This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/27997] Fortran 2003: Support type-spec for array constructor
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Mar 2008 12:58:12 -0000
- Subject: [Bug fortran/27997] Fortran 2003: Support type-spec for array constructor
- References: <bug-27997-1719@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from fxcoudert at gcc dot gnu dot org 2008-03-25 12:58 -------
(In reply to comment #6)
> Possibly when gfc_convert_expr is called on a string literal?
I'm not sure but I think you'd see the same issue on a character variable that
is not a constant. gfc_convert_expr() doesn't handle conversion of characters
into different strings lengths, and it probably shouldn't be extended to do
that (it's a special case that is only used in type-spec array constructors).
So we probably need to add some code to handle that instead of calling
gfc_convert_expr() when we have character variables. (Maybe a function to do
just that already exists in expr.c.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27997