[Bug target/111428] RISC-V vector: Flaky segfault in {min|max}val_char_{1|2}.f90

2023-10-10 Thread rdapp at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111428

--- Comment #3 from Robin Dapp  ---
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.

[Bug target/111428] RISC-V vector: Flaky segfault in {min|max}val_char_{1|2}.f90

2023-09-21 Thread rdapp at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111428

--- Comment #2 from Robin Dapp  ---
Reproduced locally.  The identical binary sometimes works and sometimes doesn't
so it must be a race...

[Bug target/111428] RISC-V vector: Flaky segfault in {min|max}val_char_{1|2}.f90

2023-09-21 Thread juzhe.zhong at rivai dot ai via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111428

--- Comment #1 from JuzheZhong  ---
Hi, Robin.
Could you take a look at it?
I doubt it is also the GIMPLE FOLD issue.