[all-commits] [llvm/llvm-project] 1746c8: [flang] Fixed crash on forward referenced `len` pa...

Pete Steinfeld via All-commits all-commits at lists.llvm.org
Thu Jun 4 13:12:46 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1746c8ed2660c83895c79de94453f44f8e729a94
      https://github.com/llvm/llvm-project/commit/1746c8ed2660c83895c79de94453f44f8e729a94
  Author: Pete Steinfeld <psteinfeld at nvidia.com>
  Date:   2020-06-04 (Thu, 04 Jun 2020)

  Changed paths:
    M flang/lib/Evaluate/variable.cpp
    M flang/test/Semantics/resolve91.f90

  Log Message:
  -----------
  [flang] Fixed crash on forward referenced `len` parameter

Summary:
Using a forward reference to define a `len` parameter causes a crash.
The underlying cause was that a previously declared type had an
erroneous expression for its `LEN` param value.  When this expression
was referenced to evaluate a subsequent expression, bad things happened.
I fixed this by putting in code to detect this case.

Reviewers: tskeith, klausler, DavidTruby

Subscribers: llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list