https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91555
--- Comment #10 from Daniel Richard G. ---
Okay. I'll accept that the code is dodgy. Thanks for looking into this.
I'll keep in mind -fsanitize=undefined as a way of tracking down these issues
in the future.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91555
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91555
--- Comment #8 from Daniel Richard G. ---
The most I could tell via strategic printf() calls is that everything appears
to run correctly up until the binary search. I don't think any (unchecked)
overflow is at issue, but it seems I don't have a w
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91555
--- Comment #7 from Andrew Pinski ---
(In reply to Daniel Richard G. from comment #6)
> Unfortunately, this GCC build does not have libsanitizer, as it is on an
> older (Linux) system without the necessary system headers.
>
> $ gcc -O2 -fsan
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91555
--- Comment #6 from Daniel Richard G. ---
Unfortunately, this GCC build does not have libsanitizer, as it is on an older
(Linux) system without the necessary system headers.
$ gcc -O2 -fsanitize=undefined gcc9-opt-bug.c -o bug
/usr/bin/l
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91555
--- Comment #5 from Andrew Pinski ---
Also does -fsanitize=undefined print anything at runtime? If so there is no
bug with GCC.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91555
--- Comment #4 from Daniel Richard G. ---
Yes, that is the case:
$ gcc -O2 gcc9-opt-bug.c -o bug
$ ./bug
WRONG 13
result: t = 18446744073709551615 (wrong)
$ gcc -O2 -fwrapv gcc9-opt-bug.c -o bug
$ ./bug
result: t = 1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91555
Andrew Pinski changed:
What|Removed |Added
Status|RESOLVED|UNCONFIRMED
Resolution|INVALID
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91555
Daniel Richard G. changed:
What|Removed |Added
Attachment #46761|0 |1
is obsolete|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91555
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
10 matches
Mail list logo