public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rdapp at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/111428] RISC-V vector: Flaky segfault in {min|max}val_char_{1|2}.f90
Date: Tue, 10 Oct 2023 19:08:20 +0000	[thread overview]
Message-ID: <bug-111428-4-hJpkCcSMUj@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111428-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111428

--- Comment #3 from Robin Dapp <rdapp at gcc dot gnu.org> ---
Still difficult to track down.  The following is a smaller reproducer:

program main
  implicit none
  integer, parameter :: n=5, m=3
  integer, dimension(n,m) :: v
  real, dimension(n,m) :: r

  do
     call random_number(r)
     v = int(r * 2)
     if (count(v < 1) > 1) exit
  end do
  write (*,*) 'asdf'
end program main

I compiled libgfortran without vector but this doesn't change anything.  It's
really just the vectorization of that snippet but I haven't figured out why,
yet.  The stack before the random_number call looks identical.

Also tried valgrind which complains about compares dependent on uninitialized
data (those only show up once compiled with vectorization).  However I suspect
those are false negatives after chasing them for some hours.

Going to try another angle of attack.  Maybe it's a really simple thing I
overlooked.

      parent reply	other threads:[~2023-10-10 19:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-15 20:26 [Bug target/111428] New: " patrick at rivosinc dot com
2023-09-21  7:06 ` [Bug target/111428] " juzhe.zhong at rivai dot ai
2023-09-21 10:16 ` rdapp at gcc dot gnu.org
2023-10-10 19:08 ` rdapp at gcc dot gnu.org [this message]

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-111428-4-hJpkCcSMUj@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).