public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/39865] ICE in gfc_conv_scalarized_array_ref
Date: Mon, 11 May 2009 17:30:00 -0000	[thread overview]
Message-ID: <20090511173006.5717.qmail@sourceware.org> (raw)
In-Reply-To: <bug-39865-87@http.gcc.gnu.org/bugzilla/>



------- Comment #10 from jakub at gcc dot gnu dot org  2009-05-11 17:30 -------
Testcase:

subroutine f1 (a)
  character(len=1) :: a(7:)
  character(len=12) :: b
  character(len=1) :: c(2:10)
  write (b, a) 'Hell', 'o wo', 'rld!'
  if (b .ne. 'Hello world!') call abort
  write (b, a(:)) 'Hell', 'o wo', 'rld!'
  if (b .ne. 'Hello world!') call abort
  write (b, a(8:)) 'Hell', 'o wo', 'rld!'
  if (b .ne. 'Hello world!') call abort
  c(2) = ' '
  c(3) = '('
  c(4) = '3'
  c(5) = 'A'
  c(6) = '4'
  c(7) = ')'
  write (b, c) 'Hell', 'o wo', 'rld!'
  if (b .ne. 'Hello world!') call abort
  write (b, c(:)) 'Hell', 'o wo', 'rld!'
  if (b .ne. 'Hello world!') call abort
  write (b, c(3:)) 'Hell', 'o wo', 'rld!'
  if (b .ne. 'Hello world!') call abort
end subroutine f1

subroutine f2 (a)
  character(len=1) :: a(10:,20:)
  character(len=12) :: b
  write (b, a) 'Hell', 'o wo', 'rld!'
  if (b .ne. 'Hello world!') call abort
  write (b, a) 'Hell', 'o wo', 'rld!'
  if (b .ne. 'Hello world!') call abort
end subroutine f2

  interface
    subroutine f1 (a)
      character(len=1) :: a(:)
    end
  end interface
  interface
    subroutine f2 (a)
      character(len=1) :: a(:,:)
    end
  end interface
  integer :: i, j
  character(len=1) :: e (6, 7:9), f (3,2), g (10)
  e = 'X'
  e(2,8) = ' '
  e(3,8) = '('
  e(4,8) = '3'
  e(2,9) = 'A'
  e(3,9) = '4'
  e(4,9) = ')'
  f = e(2:4,8:9)
  g = 'X'
  g(2) = ' '
  g(3) = '('
  g(4) = '3'
  g(5) = 'A'
  g(6) = '4'
  g(7) = ')'
  call f1 (g(2:7))
  call f2 (f)
  call f2 (e(2:4,8:9))
end


-- 


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


  parent reply	other threads:[~2009-05-11 17:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-23 12:41 [Bug fortran/39865] New: " jakub at gcc dot gnu dot org
2009-04-23 12:47 ` [Bug fortran/39865] " jakub at gcc dot gnu dot org
2009-04-23 13:07 ` dominiq at lps dot ens dot fr
2009-04-23 13:18 ` jakub at gcc dot gnu dot org
2009-04-23 13:33 ` jakub at gcc dot gnu dot org
2009-04-23 13:50 ` jakub at gcc dot gnu dot org
2009-04-23 13:57 ` burnus at gcc dot gnu dot org
2009-04-23 14:19 ` jakub at gcc dot gnu dot org
2009-04-23 14:51 ` jakub at gcc dot gnu dot org
2009-04-23 17:34 ` burnus at gcc dot gnu dot org
2009-05-11 17:30 ` jakub at gcc dot gnu dot org [this message]
2009-05-12 13:20 ` jakub at gcc dot gnu dot org
2009-05-14  0:01 ` jakub at gcc dot gnu dot org
2009-05-14  6:46 ` jakub 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=20090511173006.5717.qmail@sourceware.org \
    --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).