[all-commits] [llvm/llvm-project] 03095b: [flang] Fix crash in semantics after PDT instantia...

Peter Klausler via All-commits all-commits at lists.llvm.org
Tue May 24 11:06:30 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 03095bd97b81b40d74762713b6ed72adb59df658
      https://github.com/llvm/llvm-project/commit/03095bd97b81b40d74762713b6ed72adb59df658
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2022-05-24 (Tue, 24 May 2022)

  Changed paths:
    M flang/lib/Semantics/type.cpp

  Log Message:
  -----------
  [flang] Fix crash in semantics after PDT instantiation

The code in semantics that reinitializes symbol table pointers in
the parse tree of a parameterized derived type prior to a new
instantiation of the type was processing the symbols of the
derived type instantiation scope in arbitrary address order,
which could fail if a reference to a type parameter inherited from
an ancestor type was processed prior to the parent component sequence.
Fix by instantiating components of PDT instantiations in declaration
order.

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




More information about the All-commits mailing list