public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dominiq at lps dot ens dot fr" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/34396] New: Length of substrings defined by expressions not correctly computed in constructors Date: Sat, 08 Dec 2007 21:02:00 -0000 [thread overview] Message-ID: <bug-34396-12313@http.gcc.gnu.org/bugzilla/> (raw) The following code program array_char implicit none integer :: i character (len=5) :: x, y character (len=5) :: z(2) x = "a " y = "cd" z = "" z = (/y(1:len(trim(y))), x(1:len(trim(x)))/) print *, "|", z(1), "| |", z(2), "|" print '(99i4)', ichar ( [ (z(1)(i:i), i=1,5) ] ) print '(99i4)', ichar ( [ (z(2)(i:i), i=1,5) ] ) end program array_char gives [ibook-dhum] f90/bug% a.out |cdI| |a` | 99 100 128 73 16 97 96 12 17 0 As reported in PR33254, comment #14, the length of the strings seems not computed inget_array_ctor_var_strlen() by: if (ref->u.ss.start->expr_type != EXPR_CONSTANT || ref->u.ss.end->expr_type != EXPR_CONSTANT) break; -- Summary: Length of substrings defined by expressions not correctly computed in constructors Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dominiq at lps dot ens dot fr GCC build triplet: i686-apple-darwin9 GCC host triplet: i686-apple-darwin9 GCC target triplet: i686-apple-darwin9 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34396
next reply other threads:[~2007-12-08 21:02 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-12-08 21:02 dominiq at lps dot ens dot fr [this message] 2007-12-08 23:03 ` [Bug fortran/34396] " burnus at gcc dot gnu dot org 2007-12-08 23:08 ` dominiq at lps dot ens dot fr 2007-12-09 6:20 ` jv244 at cam dot ac dot uk 2007-12-09 6:20 ` jv244 at cam dot ac dot uk 2007-12-09 9:29 ` pault at gcc dot gnu dot org 2007-12-09 9:35 ` dominiq at lps dot ens dot fr 2007-12-09 17:14 ` pault at gcc dot gnu dot org 2007-12-16 11:45 ` pault at gcc dot gnu dot org 2008-01-10 14:29 ` burnus at gcc dot gnu dot org 2008-01-10 19:25 ` pault at gcc dot gnu dot org 2008-01-10 19:25 ` pault at gcc dot gnu dot org 2008-06-17 18:10 ` pault at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-34396-12313@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).