[Bug][move-compiler-v2] Compiler V2 constant folding folds SHR width == type size #14631
Labels
bug
Something isn't working
compiler-v2
stale-exempt
Prevents issues from being automatically marked and closed as stale
starter-task
🐛 Bug
Compiler V2 constant-folds (0u8 >> 8) to 0, while V1 leaves this operation in to abort at runtime.
The manual says the code "may abort" if the shift width is the same as the type size, so it's technically allowed (and thus not Urgent), but this behavior differs from V1, so would be better corrected.
Case 1:
Case 2:
The text was updated successfully, but these errors were encountered: