[flang] Correctly detect overlapping integer cases
authorTim Keith <tkeith@nvidia.com>
Mon, 14 Sep 2020 16:10:45 +0000 (09:10 -0700)
committerTim Keith <tkeith@nvidia.com>
Mon, 14 Sep 2020 16:10:49 +0000 (09:10 -0700)
commited0abc8ad3f3be99f40c25238ec42065a8ba077f
treed95eefe8024a16cd66cf45df36184eb281f2f7ac
parent55d371abd7f470496f45d960c29bb66da0e81aee
[flang] Correctly detect overlapping integer cases

Integer case values were being compared as unsigned by operator<
on evaluate::value::Integer. Change that to signed so that overlap
can be detected correctly.

Explicit CompareUnsigned and BLT are still available if unsigned
comparison is needed.

Fixes https://bugs.llvm.org/show_bug.cgi?id=47309

Differential Revision: https://reviews.llvm.org/D87595
flang/include/flang/Evaluate/integer.h
flang/test/Semantics/case01.f90