This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/36548] New: likely integer codegen bug
- From: "regehr at cs dot utah dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jun 2008 01:42:12 -0000
- Subject: [Bug c/36548] New: likely integer codegen bug
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
At -O and higher with -fwrapv, svn 136854 improperly compiles func_9 below into
object code returning 0.
static unsigned long
mod_rhs (long int rhs)
{
return rhs;
}
unsigned g_8 = 0x0815898FL;
int func_9 (void)
{
return ((0x0274952FL * g_8) % mod_rhs (0x0274952FL));
}
--
Summary: likely integer codegen bug
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: regehr at cs dot utah dot edu
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36548