Issue 240918
Summary Breakpoint on a line in an OpenMP task loop never stops in the loop
Labels new issue
Assignees abidh
Reporter abidh
    Reproducer: `repro.f90`.

```fortran
program repro
  real, allocatable :: x(:)
 integer :: i
  allocate(x(4))
  x = 1.0
  !$omp task
  do i = 1, 4
 x(i) = 2.0 * x(i)
  end do
  !$omp end task
end program
```

```
$ flang -g -O0 -fopenmp repro.f90 -o repro
$ gdb -q repro
Reading symbols from repro...
(gdb) b 8
Breakpoint 1 at 0x21eef2: file repro.f90, line 8.
(gdb) r

Breakpoint 1, _QQmain..omp_par () at repro.f90:8
8 x(i) = 2.0 * x(i)
(gdb) p i
$1 = 0
(gdb) c
Continuing.
[Inferior 1 (process 1701707) exited normally]
```

The breakpoint is hit once, before the loop has started (`i` is 0), and never in any of the four iterations.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to