[LLVMbugs] [Bug 3302] New: yet another math bug??
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Thu Jan 8 22:12:47 PST 2009
http://llvm.org/bugs/show_bug.cgi?id=3302
Summary: yet another math bug??
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: regehr at cs.utah.edu
CC: llvmbugs at cs.uiuc.edu
This one first appears in r61493 on Ubuntu Hardy on x86.
Unlike 3294 and 3296, it does not involve the induction variable.
Also, unlike the others, this testcase is super simple, so should be an easy
one!
llvm-gcc is valgrind-clean at -O2 for this testcase.
regehr at john-home:~/volatile/tmp118$ llvm-gcc -O1 small.c -o small
regehr at john-home:~/volatile/tmp118$ ./small
11
regehr at john-home:~/volatile/tmp118$ llvm-gcc -O2 small.c -o small
regehr at john-home:~/volatile/tmp118$ ./small
1
regehr at john-home:~/volatile/tmp118$ cat small.c
#include <stdio.h>
static unsigned
safe_sub_func_unsigned_u_u (unsigned _ui1, unsigned _ui2)
{
return _ui1 - _ui2;
}
unsigned g_57;
void func_1 (void);
void func_1 (void)
{
unsigned l_65;
for (l_65 = 10; l_65 < 19; l_65 = safe_sub_func_unsigned_u_u (l_65, 1))
{
g_57++;
}
}
int
main (void)
{
func_1 ();
printf ("%d\n", g_57);
return 0;
}
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list