Compiler bug? Addition/subtraction code

Era Scarecrow via D.gnu d.gnu at puremagic.com
Mon Jun 19 20:31:24 PDT 2017


On Tuesday, 20 June 2017 at 02:14:06 UTC, Era Scarecrow wrote:
>  To note, looking in compiler explorer (GDC 5.2.0), the 
> following output is present (for the above line):

  Apparently on GDC 6.3 this doesn't fail. So likely an old 
compiler bug.

  Adding the following after the shift more or less confirms the 
unsigned shift is the error.

     t >>= uint.sizeof*8;
     version(GNU) {
         if (t)
             t |= 0xffffffff_00000000L;
     }


More information about the D.gnu mailing list