This is an archive of the discontinued LLVM Phabricator instance.

[flang] Correctly detect overlapping integer cases
ClosedPublic

Authored by tskeith on Sep 13 2020, 9:42 PM.

Details

Summary

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

Diff Detail

Event Timeline

tskeith created this revision.Sep 13 2020, 9:42 PM
Herald added a project: Restricted Project. · View Herald Transcript
tskeith requested review of this revision.Sep 13 2020, 9:42 PM
PeteSteinfeld accepted this revision.Sep 14 2020, 7:15 AM

All builds, tests, and looks good.

This revision is now accepted and ready to land.Sep 14 2020, 7:15 AM
klausler accepted this revision.Sep 14 2020, 8:01 AM

LGTM & thanks!

This revision was automatically updated to reflect the committed changes.