Skip to content

[flang][debug] Bound of allocatable array are wrong. #98166

@abidh

Description

@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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions