Issue 98166
Summary [flang][debug] Bound of allocatable array are wrong.
Labels flang
Assignees abidh
Reporter abidh
    With the following program compiled with clang and stopped at line 8, this is output we get from the GDB.

```
ptype min::alloc2d
type = integer, allocatable (-1:3,-2:5)
```
which is clearly wrong. The expected output is `type = integer, allocatable (-1:1,-2:2)`

```
module min
  INTEGER, ALLOCATABLE, TARGET :: alloc2d(:, :)
end module min

PROGRAM minimal
  use min
 ALLOCATE(alloc2d(-1:1, -2:2))
  IF (ALLOCATED(alloc2d)) THEN
 alloc2d(:, :) = -1
    DEALLOCATE(alloc2d)
  END IF
END PROGRAM
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to