On 10/26/13 01:15, Marc Glisse wrote:
Hello,
this patch teaches gcc that free kills the memory its argument points
to. The equality test is probably too strict, I guess we can loosen it
later (unless you have suggestions?).
Note that the corresponding code for BUILT_IN_MEMCPY and others seems
suspicious to me, it looks like it is testing for equality between a
pointer and a mem_ref, which is unlikely to happen.
Bootstrap+testsuite on x86_64-unknown-linux-gnu.
2013-10-27 Marc Glisse <marc.gli...@inria.fr>
PR tree-optimization/19831
gcc/
* tree-ssa-alias.c (stmt_kills_ref_p_1): Handle BUILT_IN_FREE.
gcc/testsuite/
* gcc.dg/tree-ssa/alias-25.c: New file.
OK for the trunk.
I agree the MEM_REF* and VA_END cases look strange and I think they're
wrong as well. Did you happen to try fixing them and running the
testsuite to see if anything fails?
ISTM your testcase could be tweaked to test conclusively if they're
doing the right thing -- and regardless of what's found that test
can/should make its way into the testsuite.
Jeff