public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/66876] vrp: changing unsigned to signed comparison
[not found] <bug-66876-4@http.gcc.gnu.org/bugzilla/>
@ 2015-07-15 9:58 ` mikpelinux at gmail dot com
2015-07-15 10:00 ` mpolacek at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: mikpelinux at gmail dot com @ 2015-07-15 9:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66876
Mikael Pettersson <mikpelinux at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikpelinux at gmail dot com
--- Comment #1 from Mikael Pettersson <mikpelinux at gmail dot com> ---
Compile with -fsanitize=undefined and you'll get
runtime error: signed integer overflow: 60667 * 65536 cannot be represented in
type 'int'
The "65536 * d[1]" sub-expression is evaluated as int*int->int, so it overflows
and then all bets are off.
Append a U to the 64K literal.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug middle-end/66876] vrp: changing unsigned to signed comparison
[not found] <bug-66876-4@http.gcc.gnu.org/bugzilla/>
2015-07-15 9:58 ` [Bug middle-end/66876] vrp: changing unsigned to signed comparison mikpelinux at gmail dot com
@ 2015-07-15 10:00 ` mpolacek at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-07-15 10:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66876
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |mpolacek at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Yeah, this looks invalid.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-15 10:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-66876-4@http.gcc.gnu.org/bugzilla/>
2015-07-15 9:58 ` [Bug middle-end/66876] vrp: changing unsigned to signed comparison mikpelinux at gmail dot com
2015-07-15 10:00 ` mpolacek at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).