[all-commits] [llvm/llvm-project] 6b99dc: [flang] Fix crash from a blank BIND(C, NAME="") on ...

Peter Klausler via All-commits all-commits at lists.llvm.org
Wed May 25 14:48:10 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b99dc29c6efa5d36306dd567c5e972cafb85c17
      https://github.com/llvm/llvm-project/commit/6b99dc29c6efa5d36306dd567c5e972cafb85c17
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2022-05-25 (Wed, 25 May 2022)

  Changed paths:
    M flang/lib/Semantics/resolve-names.cpp

  Log Message:
  -----------
  [flang] Fix crash from a blank BIND(C,NAME="") on subprogram

A recent change fixed the processing of BIND(C,NAME=expr) character
expressions so that they are evaluated as constants in the scope of
the subprogram.  However, when the character name expression results
in an empty value after trimming, the compiler emits a warning message,
and this message is now causing a crash due to a lack of statement
context.  To fix, extend the deferred processing of the BIND(C,NAME="")
so that a basic statement context exists.

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




More information about the All-commits mailing list