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