[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
Loading
Please sign in to comment