public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/31821] character pointer => target(range) should detect if lengths don't match
Date: Sun, 12 Dec 2010 14:09:00 -0000	[thread overview]
Message-ID: <bug-31821-4-Ot3XitGqmw@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-31821-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31821

--- Comment #8 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2010-12-12 14:09:12 UTC ---
The patch in comment#7 causes a regression in

program gfcbug33
  character(12) :: a(2)
  a(1) = "abcdefghijkl"
  a(2) = "mnopqrstuvwx"
  call foo ((a(2:1:-1)(6:)))
contains
  subroutine foo (chr)
    character(7) :: chr(:)
    print *,'X',chr(1),'Y'
    print *,'A',chr(2),'B'
    if (chr(1)//chr(2) .ne. "rstuvwxfghijkl") call abort ()
  end subroutine foo
end program gfcbug33
ig25@linux-fd1f:~/Krempel/Char> gfortran short_1.f90
ig25@linux-fd1f:~/Krempel/Char> ./a.out
 XrstuvwxY
 A%�2�fgB
Abgebrochen

which is a shortened version of actual_array_substr_1.f90.

The part of the patch

-         if (substring)
-           primary->ts.u.cl = NULL;
-

opens a can of worms of wrong-code and rejects-valid bugs...


  parent reply	other threads:[~2010-12-12 14:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-31821-4@http.gcc.gnu.org/bugzilla/>
2010-12-11  9:47 ` tkoenig at gcc dot gnu.org
2010-12-11 12:38 ` tkoenig at gcc dot gnu.org
2010-12-11 13:25 ` tkoenig at gcc dot gnu.org
2010-12-12 13:58 ` tkoenig at gcc dot gnu.org
2010-12-12 14:09 ` tkoenig at gcc dot gnu.org [this message]
2010-12-13 20:29 ` tkoenig at gcc dot gnu.org
2010-12-13 20:29 ` tkoenig at gcc dot gnu.org
2010-12-21 22:11 ` tkoenig at gcc dot gnu.org
2010-12-24  8:42 ` tkoenig at gcc dot gnu.org
2010-12-24  8:44 ` tkoenig at gcc dot gnu.org
2007-05-04 19:11 [Bug fortran/31821] New: " burnus at gcc dot gnu dot org
2007-05-04 19:43 ` [Bug fortran/31821] " jvdelisle at gcc dot gnu dot org
2007-05-04 21:14 ` burnus at gcc dot gnu dot org
2007-05-25  4:39 ` 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-31821-4-Ot3XitGqmw@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: link
Be 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).