[LLVMbugs] [Bug 21725] New: wrong results with union and strict-aliasing
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Dec 3 05:55:40 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=21725
Bug ID: 21725
Summary: wrong results with union and strict-aliasing
Product: libraries
Version: 3.4
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Global Analyses
Assignee: unassignedbugs at nondot.org
Reporter: bruno-llvm at defraine.net
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 13420
--> http://llvm.org/bugs/attachment.cgi?id=13420&action=edit
test.c
The following testcase produces wrong results with '-O1' and higher (tested
with llvm-3.4 and llvm-3.5).
Disabling 'strict-aliasing' makes the problem go away.
We do believe that the behavior should be the same with and without
strict-aliasing.
It seems that initially, the write to 'u.s' is moved out of the loop.
(more exactly, after the loop)
Later on the loop is removed, with only the write to 'up->i' remaining.
As the store to 'u.s' is still following, the end result is not what we expect
to see.
--
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/20141203/ddfce3af/attachment.html>
More information about the llvm-bugs
mailing list