[Bug c/36137] New: gcc can't do math
otte at gnome dot org
gcc-bugzilla@gcc.gnu.org
Mon May 5 14:17:00 GMT 2008
The attached program prints (unsigned) -1 as opposed to 1.
This doesn't happen if intermediate variables are used somewhere in the
process.
I tested gcc 3.4, 4.2.3 (on both x86 and x86-64) with -O0 and -O2, all ended up
with -1.
suncc printed 1.
--
Summary: gcc can't do math
Product: gcc
Version: 4.2.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: otte at gnome dot org
GCC build triplet: i486-linux-gnu
GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36137
More information about the Gcc-bugs
mailing list