[all-commits] [llvm/llvm-project] 1ee908: [flang] Preserve bound info for pointer assignment...

Jonathon Penix via All-commits all-commits at lists.llvm.org
Mon Dec 12 14:28:38 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1ee9080d6b94e1779ba9f0078c9d570d14ca7e35
      https://github.com/llvm/llvm-project/commit/1ee9080d6b94e1779ba9f0078c9d570d14ca7e35
  Author: Jonathon Penix <jpenix at quicinc.com>
  Date:   2022-12-12 (Mon, 12 Dec 2022)

  Changed paths:
    M flang/lib/Lower/ConvertExpr.cpp
    M flang/test/Lower/parent-component.f90
    M flang/test/Lower/pointer-assignments.f90

  Log Message:
  -----------
  [flang] Preserve bound info for pointer assignments through derived types

Doing a pointer assignment to another pointer which is a derived type component
could result in the bound information being lost, potentially leading to
incorrect array accesses. Fix this by trying to retain the bound info during
the assignment.

Fixes #57441

Differential Revision: https://reviews.llvm.org/D139800




More information about the All-commits mailing list