aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorPete Steinfeld <psteinfeld@nvidia.com>2020-07-15 16:02:49 -0700
committerPete Steinfeld <psteinfeld@nvidia.com>2020-07-23 09:14:10 -0700
commit83dca19c11236700d26ebd1ecff65e01876c1e9d (patch)
tree8f1e33ddbe832f6c0169edd380efbc987be976c8 /llvm/lib/Support
parentccdb5b4bbe8470d1c558ecfd0658240d4c8f8df2 (diff)
downloadllvm-83dca19c11236700d26ebd1ecff65e01876c1e9d.zip
llvm-83dca19c11236700d26ebd1ecff65e01876c1e9d.tar.gz
llvm-83dca19c11236700d26ebd1ecff65e01876c1e9d.tar.bz2
[flang] Fix a crash when a BOZ literal is used as a relational operator
Summary: Expressions like `iVar==z'fe'` were causing an assertion error because the `Relate()` function in `Evaluate/tools.cpp` that processes relational operators didn't deal with BOZ literals, which are typeless. I fixed this by checking to see if the operands are BOZ literals. If so, if the other operand is REAL, I convert them to REAL. Otherwise, I convert them to integers with default kind. I also added a test to resolve63.f90 that triggers the problem. Reviewers: tskeith, DavidTruby Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D83917
Diffstat (limited to 'llvm/lib/Support')
0 files changed, 0 insertions, 0 deletions