[LLVMbugs] [Bug 3018] New: likely integer miscompilation
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Thu Nov 6 19:49:16 PST 2008
http://llvm.org/bugs/show_bug.cgi?id=3018
Summary: likely integer miscompilation
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
Seen using r58823 on Ubuntu Hardy on x86.
Probably not the same bug as PR 2999 since here it looks wrong at -O0.
llvm-gcc valgrinds clean at -O0.
Behavior seen here is the same as 2.3 but different from 2.[0,1,2].
regehr at john-home:~/volatile/tmp57$ llvm-gcc -O0 small.c -o small
regehr at john-home:~/volatile/tmp57$ ./small
hi
regehr at john-home:~/volatile/tmp57$ llvm-gcc -O1 small.c -o small
regehr at john-home:~/volatile/tmp57$ ./small
regehr at john-home:~/volatile/tmp57$ cat small.c
#include <stdio.h>
static int
foo (int rhs)
{
return rhs;
}
int func_17 (signed char p_21);
int func_17 (signed char p_21)
{
return 1;
}
int func_104 (void);
int func_104 (void)
{
return 1;
}
void func_1 (void);
void func_1 (void)
{
int l_359 = 0;
if ((func_17 (1 % foo (1))) -
((((func_104 () >= 1) > -1L) || 0) | (0x1B90L & l_359) + 1)) {
printf ("hi\n");
}
}
int main (void)
{
func_1 ();
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