[all-commits] [llvm/llvm-project] 77a57f: [flang] Avoid crash in statement function error case

Peter Klausler via All-commits all-commits at lists.llvm.org
Thu Jun 22 13:26:03 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 77a57f6b250faf78637a44e88006923476421385
      https://github.com/llvm/llvm-project/commit/77a57f6b250faf78637a44e88006923476421385
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2023-06-22 (Thu, 22 Jun 2023)

  Changed paths:
    M flang/lib/Evaluate/tools.cpp
    M flang/test/Semantics/stmt-func01.f90

  Log Message:
  -----------
  [flang] Avoid crash in statement function error case

The predicate IsPureProcedure() crashes with infinite
recursion when presented with mutually recursive statement
functions -- an error case that should be recoverable.
Fix by adding a visited set.

Fixes bug https://github.com/llvm/llvm-project/issues/63231

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




More information about the All-commits mailing list