public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Dominique d'Humières" <dominiq@lps.ens.fr>
To: Thomas Koenig <tkoenig@netcologne.de>
Cc: gfortran <fortran@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch, fortran] Handle missing optional MASK for intrinsics
Date: Mon, 31 Dec 2018 14:10:00 -0000	[thread overview]
Message-ID: <9BCE89DF-4F1A-48D1-9FE9-C819EC747F29@lps.ens.fr> (raw)

Hi Thomas,

Another glitch: the following test (reduced from gfortran.dg/optional_absent_4.f90)

module z
  implicit none
contains

  subroutine findloc_4 (input, val, res, mask)
    logical, intent(in), optional :: mask(:,:)
    integer, intent(in) :: input(:,:)
    integer, dimension(:), intent(out) :: res
    integer, intent(in) :: val
    integer :: n = 1
    res = findloc(input, val, dim=n)
  end subroutine findloc_4

end module z

program main
  use z
  implicit none
  integer :: i2(2,3) = reshape([1,2,4,8,16,32], [2,3])
  integer, dimension(3) :: res3
  res3 = -2
  call findloc_4 (i2, 4, res3)

end program main

gives at runtime

a.out(77719,0x10335e5c0) malloc: Incorrect checksum for freed object 0x7fb131403d50: probably modified after being freed.
Corrupt value: 0x0
a.out(77719,0x10335e5c0) malloc: *** set a breakpoint in malloc_error_break to debug

Program received signal SIGABRT: Process abort signal.

TIA,

Dominique

             reply	other threads:[~2018-12-31 12:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-31 14:10 Dominique d'Humières [this message]
2018-12-31 17:17 ` Thomas Koenig
  -- strict thread matches above, loose matches on Subject: below --
2018-12-31 14:00 Dominique d'Humières
2018-12-30 17:40 Thomas Koenig
2018-12-31  1:02 ` Steve Kargl
2018-12-31  4:06   ` Steve Kargl

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=9BCE89DF-4F1A-48D1-9FE9-C819EC747F29@lps.ens.fr \
    --to=dominiq@lps.ens.fr \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tkoenig@netcologne.de \
    /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).