https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100444
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Richard Biener from comment #4) > so here it could check for -1 as well though in theory that > can happen with true randomness as well, even if very unlikely. Note > that it would never return -1 then (as it never returns 0 at the moment). The return value is not the random number, it's 0 for failure and 1 for success. The random number is in val. So it can return 0. The AMD bug is that it returns 1 when it shouldn't.