This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33254] Diagnose different string lengths in array constructors at run time
- From: "Tobias dot Schlueter at physik dot uni-muenchen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Oct 2007 20:13:15 -0000
- Subject: [Bug fortran/33254] Diagnose different string lengths in array constructors at run time
- References: <bug-33254-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #15 from Tobias dot Schlueter at physik dot uni-muenchen dot de 2007-10-21 20:13 -------
Subject: Re: Diagnose different string lengths in array
constructors at run time
dominiq at lps dot ens dot fr wrote:
> ------- Comment #14 from dominiq at lps dot ens dot fr 2007-10-21 20:05 -------
> Now I understand the strange result I reported in comment #5. What is happening
> is that there is a second nonprintable character. If I redirect the output to a
> file I see it (in general ^@).
>
> From what I understand of the code the substring x(1:len(trim(x))) is not
> computed correctly by:
>
> if (ref->u.ss.start->expr_type != EXPR_CONSTANT
> || ref->u.ss.end->expr_type != EXPR_CONSTANT)
> break;
>
> probably not computed at all, as noticed by Tobias Schlüter in the patch in
>
> http://gcc.gnu.org/ml/fortran/2007-10/msg00212.html
The next iteration of the testcase will contain code that verifies that
the string length actually gets calculated :-}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33254