https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91837
--- Comment #5 from Daniel Cooke <dan.cooke89 at gmail dot com> --- (In reply to H.J. Lu from comment #4) > (In reply to Daniel Cooke from comment #3) > > I tried replicating the issue on a CentOS machine (AWS EC2) with the exact > > same CPU and got the correct output. However, I just fired up a fresh AWS > > EC2 instance running Ubuntu and I can replicate the bug again. Is it > > possible that the bug is CPU *and* OS specific? > > You may run into > > https://sourceware.org/bugzilla/show_bug.cgi?id=23465 It does seem like this could be the issue. I upgraded my binutils to 2.32 (from 2.30) and the problem disappears. I'll do some more testing and report back.