[all-commits] [llvm/llvm-project] 9bbec0: [flang] Fix SIZEOF() expression rewriting (#66241)

Peter Klausler via All-commits all-commits at lists.llvm.org
Mon Sep 18 09:21:04 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9bbec0ad42a8e8c8f564a36adb1e819a0921a7f9
      https://github.com/llvm/llvm-project/commit/9bbec0ad42a8e8c8f564a36adb1e819a0921a7f9
  Author: Peter Klausler <35819229+klausler at users.noreply.github.com>
  Date:   2023-09-18 (Mon, 18 Sep 2023)

  Changed paths:
    M flang/include/flang/Evaluate/characteristics.h
    M flang/include/flang/Evaluate/shape.h
    M flang/lib/Evaluate/shape.cpp
    A flang/test/Evaluate/rewrite05.f90

  Log Message:
  -----------
  [flang] Fix SIZEOF() expression rewriting (#66241)

The rewriting of the extension intrinsic function SIZEOF was producing
results that would reference symbols that were not available in the
current scope, leading to crashes in lowering. The symbols could be
function result variables, for SIZEOF(func()), or bare derived type
component names, for SIZEOF(array(n)%component). Fixing this without
regressing on a current test case involved careful threading of some
state through the TypeAndShape characterization code and the
shape/bounds analyzer, and some clean-up was done along the way.




More information about the All-commits mailing list