[all-commits] [llvm/llvm-project] 919b1e: [flang][debug] Support pointer type. (#96153)

Abid Qadeer via All-commits all-commits at lists.llvm.org
Tue Jun 25 02:01:08 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 919b1ecafc010379eff88368b050068223a01f99
      https://github.com/llvm/llvm-project/commit/919b1ecafc010379eff88368b050068223a01f99
  Author: Abid Qadeer <haqadeer at amd.com>
  Date:   2024-06-25 (Tue, 25 Jun 2024)

  Changed paths:
    M flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp
    A flang/test/Integration/debug-ptr-type.f90
    A flang/test/Transforms/debug-ptr-type.fir

  Log Message:
  -----------
  [flang][debug] Support pointer type. (#96153)

The handling of `PointerType` is similar to `HeapType`. The only
difference is that allocated flag is generated for `HeapType` and
associated flag for `PointerType`. The tests for pointer to allocatable
strings are disabled for now. I will enable them once #95906 is merged.

The debugging in GDB looks like this:
    
      integer, pointer :: par2(:)
      integer, target, allocatable :: ar2(:) 
      integer, target :: sc
      integer, pointer :: psc
      allocate(ar2(4))
      par2 => ar2
      psc => sc
    
    19        par2 => ar2
    (gdb) p par2
    $3 = <not associated>
    (gdb) n
    20        do i=1,5
    (gdb) p par2
    $4 = (0, 0, 0, 0)
    (gdb) ptype par2
    type = integer (4)
    (gdb) p sc
    $5 = 3
    (gdb) p psc
    $6 = (PTR TO -> ( integer )) 0x7fffffffda24
    (gdb) p *psc
    $7 = 3



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list