[Bug libstdc++/94823] modulo arithmetic bug in random.tcc

2022-07-21 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94823 --- Comment #10 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:df118d7ba138cacb17203d4a1b5f27730347cc77 commit r13-1783-gdf118d7ba138cacb17203d4a1b5f27730347cc77 Author: Jason Merrill Date: W

[Bug libstdc++/94823] modulo arithmetic bug in random.tcc

2020-10-09 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94823 Jonathan Wakely changed: What|Removed |Added Target Milestone|--- |11.0 Status|NEW

[Bug libstdc++/94823] modulo arithmetic bug in random.tcc

2020-10-09 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94823 --- Comment #8 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:3ee44d4c518d61c6bbf75fcf280edc6ce5326ce0 commit r11-3759-g3ee44d4c518d61c6bbf75fcf280edc6ce5326ce0 Author: Jonathan Wakely Date:

[Bug libstdc++/94823] modulo arithmetic bug in random.tcc

2020-10-09 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94823 --- Comment #7 from Jonathan Wakely --- Despite the code being correct, I think it would be better to hoist this branch out of the loop: if (__k == 0) __r2 += __s; else if (__k <= __s) __r2 += __kn + _

[Bug libstdc++/94823] modulo arithmetic bug in random.tcc

2020-04-29 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94823 Nathan Sidwell changed: What|Removed |Added Status|RESOLVED|NEW Last reconfirmed|

[Bug libstdc++/94823] modulo arithmetic bug in random.tcc

2020-04-28 Thread hiraditya at msn dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94823 --- Comment #5 from AK --- > So when __k == 0, then all three of those loads will be _Type(0x8b8b8b8bu) > really; no matter what the values of __n, __p will be. Will it be a good idea to add the explanation in comments, as this may be tricky f

[Bug libstdc++/94823] modulo arithmetic bug in random.tcc

2020-04-28 Thread hiraditya at msn dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94823 --- Comment #4 from AK --- Makes sense. Thanks for the explanation.

[Bug libstdc++/94823] modulo arithmetic bug in random.tcc

2020-04-28 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94823 --- Comment #3 from Andrew Pinski --- >In particular when __k is zero we're taking '(2^64 - 1) mod __n', which is not >necessarily __n - 1, the last position in the buffer, right? Yes that is correct except when __k is 0, then __begin will the

[Bug libstdc++/94823] modulo arithmetic bug in random.tcc

2020-04-28 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94823 Andrew Pinski changed: What|Removed |Added Resolution|--- |WONTFIX Status|UNCONFIRMED

[Bug libstdc++/94823] modulo arithmetic bug in random.tcc

2020-04-28 Thread hiraditya at msn dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94823 AK changed: What|Removed |Added CC||hiraditya at msn dot com --- Comment #1 from AK --