[flang] Downgrade a fatal error to a warning
authorPeter Klausler <pklausler@nvidia.com>
Tue, 26 Apr 2022 20:29:55 +0000 (13:29 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Wed, 27 Apr 2022 19:31:58 +0000 (12:31 -0700)
commit84c6dc96accc6a0818f196b1a09c9696354a4c19
tree35b9af0c2d8556bb7ca12897fa8d31404911807f
parent787ee99d4fd9fd45c9546202e9b73b01ce28c49e
[flang] Downgrade a fatal error to a warning

A non-CHARACTER expression in a CASE statement is allowed to have
a distinct kind (not type) from the expression in its SELECT CASE.
If a value in a CASE statement is out of range for the SELECT CASE
type, emit a warning, but it should not be a fatal error.

Differential Revision: https://reviews.llvm.org/D124544
flang/lib/Semantics/check-case.cpp
flang/test/Semantics/case01.f90