[Mlir-commits] [llvm] [mlir] [llvm][OpenMP] Handle complex types in atomic read (PR #111377)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Oct 18 02:00:23 PDT 2024


NimishMishra wrote:

Hi @tblah,

    Thanks for the test. I could reproduce the issue with my patch.

    GDB shows the segfault is in atomic_load. I have a couple of questions regarding the test that can help in triaging this better:


I was not able to reproduce the segfault on the following test, which is strange, because I did not expect the segfault to depend on `do`

```
program complex_read
  complex :: x = 0
  complex v
  !$omp parallel
    !$omp atomic read
      v = x
  !$omp end parallel
end program
```

Moreover, the following test (where I remove the `if`), I observe a crash.

```
program complex_read
  complex :: x = 0
  complex v
  !$omp parallel
  do
    !$omp atomic read
      v = x
  end do
  !$omp end parallel
end program
```

Taking a step further, if I remove the `atomic read` (i.e. the following test), the crash still happens.

```
program complex_read
  complex :: x = 0
  complex v
  !$omp parallel
  do
      v = x
  end do
  !$omp end parallel
end program
```


https://github.com/llvm/llvm-project/pull/111377


More information about the Mlir-commits mailing list