[all-commits] [llvm/llvm-project] 1094ee: [flang][debug] Better handle array lower bound of ...

Abid Qadeer via All-commits all-commits at lists.llvm.org
Mon Sep 30 12:31:30 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1094ee71da533929cebb7ce98fd2665c924387a7
      https://github.com/llvm/llvm-project/commit/1094ee71da533929cebb7ce98fd2665c924387a7
  Author: Abid Qadeer <haqadeer at amd.com>
  Date:   2024-09-30 (Mon, 30 Sep 2024)

  Changed paths:
    M flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp
    M flang/test/Integration/debug-allocatable-1.f90
    M flang/test/Integration/debug-assumed-shape-array.f90
    M flang/test/Integration/debug-ptr-type.f90
    M flang/test/Transforms/debug-assumed-shape-array.fir

  Log Message:
  -----------
  [flang][debug] Better handle array lower bound of assumed shape arrays. (#110302)

As mentioned in #108633, we don't respect the lower bound of the assumed
shape arrays if those were specified. It happens in both cases:
1. When caller has non-default lower bound and callee has default
2. When callee has non-default lower bound and caller has default

This PR tries to fix this issue by improving our generation of lower
bound attribute on DICompositeTypeAttr. If we see a lower bound in the
declaration, we respect that. Note that same function is also used for
allocatable/pointer variables. We make sure that we get the lower bound
from descriptor in those cases. Please note that DWARF assumes a lower
bound of 1 so in many cases we don't need to generate the lower bound.

Fixes #108633.



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