[all-commits] [llvm/llvm-project] 5193d1: [Flang] Fix ALLOCATE with MOLD for scalars

Pete Steinfeld via All-commits all-commits at lists.llvm.org
Tue Feb 28 07:50:38 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5193d19fb4ff5c26f7b7b3f7dc2aa2a2c816f1d3
      https://github.com/llvm/llvm-project/commit/5193d19fb4ff5c26f7b7b3f7dc2aa2a2c816f1d3
  Author: Peter Steinfeld <psteinfeld at nvidia.com>
  Date:   2023-02-28 (Tue, 28 Feb 2023)

  Changed paths:
    M flang/lib/Lower/Allocatable.cpp
    A flang/test/Lower/allocate-mold.f90

  Log Message:
  -----------
  [Flang] Fix ALLOCATE with MOLD for scalars

When we allocate a variable using a MOLD argument, the function that
applies the type of the MOLD argument first checks to see if the
variable is already allocated by looking at its descriptor.  But in the
case of allocating a scalar, the descriptor was not yet been created and
the associated memory is uninitialized.  This change fixes that.

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




More information about the All-commits mailing list