It's not a bug in my opinion, it's the way the compiler generates the code; it follows rules. It first does the shift and next it assigns; as the shift is done on the 16-bit variable, you will end up with 0. The way around could have been to first assign the 16-bit variable to the 32-bit variable and next shift the 32-bit variable.
2 Likes