[all-commits] [llvm/llvm-project] e712a9: [flang] Fix crash on structure constructor as sele...
Peter Klausler via All-commits
all-commits at lists.llvm.org
Thu Jun 3 14:48:50 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e712a92b8fe706c4a736748af324382850d1515c
https://github.com/llvm/llvm-project/commit/e712a92b8fe706c4a736748af324382850d1515c
Author: peter klausler <pklausler at nvidia.com>
Date: 2021-06-03 (Thu, 03 Jun 2021)
Changed paths:
M flang/include/flang/Semantics/expression.h
M flang/lib/Semantics/expression.cpp
M flang/lib/Semantics/resolve-names.cpp
Log Message:
-----------
[flang] Fix crash on structure constructor as selector
In something like "ASSOCIATE(X=>T(1))", the "T(1)" is parsed
as a Variable because it looks like a function reference or
array reference; if it turns out to be a structure constructor,
which is something we can't know until we're able to attempt
generic interface resolution in semantics, the parse tree needs
to be fixed up by replacing the Variable with an Expr.
The compiler could already do this for putative function references
encapsulated as Exprs, so this patch moves some code around and
adds parser::Selector to the overloads of expression analysis.
Differential Revision: https://reviews.llvm.org/D103572
More information about the All-commits
mailing list