public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/30964] optional arguments to random_seed
Date: Tue, 22 May 2007 08:24:00 -0000	[thread overview]
Message-ID: <20070522082356.9438.qmail@sourceware.org> (raw)
In-Reply-To: <bug-30964-10391@http.gcc.gnu.org/bugzilla/>



------- Comment #5 from fxcoudert at gcc dot gnu dot org  2007-05-22 09:23 -------
There's more to it. When generate wrong-code for optional arguments, as shown
by the following code:

$ cat b.f90 
program trs
  implicit none
  integer :: size, ierr
  integer, allocatable, dimension(:) :: seed
  call random_seed(size)
  allocate(seed(size), stat=ierr)
  if (ierr /= 0) stop
  call test_random_seed()
contains
  subroutine test_random_seed(get)
    integer, dimension(:), optional :: get
    call random_seed(get=get)
  end subroutine test_random_seed
end program trs
$ gfortran b.f90 && ./a.out
Segmentation fault


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |major
           Keywords|                            |wrong-code


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


  parent reply	other threads:[~2007-05-22  8:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-25 21:16 [Bug fortran/30964] New: " tkoenig at gcc dot gnu dot org
2007-02-26  0:14 ` [Bug fortran/30964] " kargl at gcc dot gnu dot org
2007-02-26 19:53 ` tkoenig at gcc dot gnu dot org
2007-03-03 10:36 ` fxcoudert at gcc dot gnu dot org
2007-03-15 12:59 ` fxcoudert at gcc dot gnu dot org
2007-05-21 14:21 ` fxcoudert at gcc dot gnu dot org
2007-05-22  8:24 ` fxcoudert at gcc dot gnu dot org [this message]
2007-05-28 20:48 ` fxcoudert at gcc dot gnu dot org
2007-08-11 23:22 ` fxcoudert at gcc dot gnu dot org
2007-08-11 23:33 ` fxcoudert at gcc dot gnu dot org
2007-08-12  0:16 ` fxcoudert at gcc dot gnu dot org
2007-08-12 16:41 ` fxcoudert at gcc dot gnu dot org
2007-08-12 20:45 ` fxcoudert at gcc dot gnu dot org
2007-08-12 20:46 ` fxcoudert 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=20070522082356.9438.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).