[Issue 23618] New: Right Shift equals expressions on unsigned shorts don't behave the same as regular shifts
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed Jan 11 03:15:08 UTC 2023
    
    
  
https://issues.dlang.org/show_bug.cgi?id=23618
          Issue ID: 23618
           Summary: Right Shift equals expressions on unsigned shorts
                    don't behave the same as regular shifts
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: maxhaton at gmail.com
unittest {
    const ushort tru = 1028;
    ushort ee = tru;
    ee <<= 5U;
    ee >>= 5U;
    assert(((tru << 5U) >> 5U) == ee);
}
Seems similar to regression 3583 from 2009
--
    
    
More information about the Digitalmars-d-bugs
mailing list