Issue |
120724
|
Summary |
[flang][openmp] crash in complex atomic
|
Labels |
flang
|
Assignees |
|
Reporter |
jeanPerier
|
```
complex c
integer :: i
c=(1.0,1.0)
call omp_set_num_threads(4)
!$omp parallel do
do i = 1, 100000000
!$omp atomic
c = c + (1.0,1.0)
end do
print *, c
end
```
Segfaults in __atomic_compare_exchange
```
#0 0x00007ffff7fa46c7 in __atomic_compare_exchange () from /lib/x86_64-linux-gnu/libatomic.so.1
#1 0x0000555555555418 in _QQmain..omp_par () at repro.f90:7
#2 0x00007ffff62c3239 in __kmp_invoke_microtask () from lib/libomp.so
#3 0x00007ffff624041f in __kmp_invoke_task_func () from lib/libomp.so
#4 0x00007ffff623f07e in __kmp_launch_thread () from lib/libomp.so
#5 0x00007ffff62a2f18 in __kmp_launch_worker(void*) () from lib/libomp.so
#6 0x00007ffff5e94ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#7 0x00007ffff5f26660 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
````
If I lower the loop iteration from 100000000 to 1000000, I do not see such crash and the expected number is printed.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs