https://sourceware.org/bugzilla/show_bug.cgi?id=30578
Jan Beulich <jbeulich at suse dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-07-20 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #2 from Jan Beulich <jbeulich at suse dot com> --- See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108941. The cast in (uint8_t)(-s) isn't honored by gcc when s can be determined to be a plain number, making it emit a negative value. Negative shift counts of course make no sense (on x86 at least). See the description of the referenced binutils patch as to the resulting misbehavior for RCL and RCR. For SHL/SHR etc the behavior would still be correct, but (dis)allowing negative shift counts there is a matter of consistency. I won't mark this "invalid" right away, to allow for discussion to happen here that should have happened on the patch submission (if need be). -- You are receiving this mail because: You are on the CC list for the bug.