[LLVMbugs] [Bug 15522] New: Loop Optimizer Problems
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Mar 15 00:55:43 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=15522
Bug ID: 15522
Summary: Loop Optimizer Problems
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: 8181919 at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
#include <stdio.h>
#include <stdlib.h>
int main()
{
long buf[2];
long *pvalue = &buf[0];
long *pj = &buf[1];
long *pi = &buf[2];
for(*pj=0; *pj<1000000; (*pj)++)
{
*pvalue = 0;
for(*pi=0; *pi<1000; (*pi)++)
{
*pvalue += (*pi)+1;
}
}
printf("%ld\n", *pvalue);
}
when I compile it with:clang main.c -O3
the result is 0
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130315/e8ab6085/attachment.html>
More information about the llvm-bugs
mailing list