[LLVMbugs] [Bug 3123] New: clang miscompiling comma operator
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sun Nov 23 22:24:01 PST 2008
http://llvm.org/bugs/show_bug.cgi?id=3123
Summary: clang miscompiling comma operator
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 r59934 on Ubuntu Hardy on x86.
Obviously the right answer is 1.
regehr at john-home:~/volatile/tmp67$ clang small.c -I/usr/include --emit-llvm -o
- | llvm-as | llc | as -o small.o ; gcc small.o -o small
regehr at john-home:~/volatile/tmp67$ ./small
0
regehr at john-home:~/volatile/tmp67$ cat small.c
#include <stdio.h>
#include <stdint.h>
uint32_t g_60;
int32_t func_111 (void);
int32_t func_111 (void)
{
g_60 = 1;
return 1;
}
void func_1 (void);
void func_1 (void)
{
if (func_111 (), 0) { }
}
int main (void)
{
func_1 ();
printf ("%d\n", g_60);
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