[llvm-commits] [llvm] r120974 - in /llvm/trunk: include/llvm/Analysis/AliasAnalysis.h lib/Transforms/Scalar/DeadStoreElimination.cpp test/Transforms/DeadStoreElimination/simple.ll

John McCall rjmccall at apple.com
Mon Dec 6 10:05:27 PST 2010


On Dec 6, 2010, at 5:40 AM, Jakub Staszak wrote:
> However, sometimes we change *ptr = x; into memcpy. Do we guarantee
> that operands won't overlap then?

C99 6.5.16.1:
  If the value being stored in an object is read from another object
  that overlaps in any way the storage of the first object, then the overlap
  shall be exact and the two objects shall have qualified or unqualified
  versions of a compatible type; otherwise, the behavior is undefined.

Also, source compatibility is a lot less important than object compatibility.
There are plenty of other reasons why a project that compiles correctly
with some specific version (or range of versions) of gcc might fail or be
miscompiled when compiled with any other compiler for the first time.
Most of those reasons come down to being project bugs.

John.



More information about the llvm-commits mailing list