Commit a1fc386a by Richard Biener Committed by Richard Biener

tree-ssa-alias.c (indirect_refs_may_alias_p): Do not treat arrays with same type…

tree-ssa-alias.c (indirect_refs_may_alias_p): Do not treat arrays with same type as objects that cannot overlap.

2016-12-01  Richard Biener  <rguenther@suse.de>

	* tree-ssa-alias.c (indirect_refs_may_alias_p): Do not
	treat arrays with same type as objects that cannot overlap.

	* gcc.dg/torture/alias-2.c: New testcase.

From-SVN: r243106
parent b0da9709
2016-12-01 Richard Biener <rguenther@suse.de>
* tree-ssa-alias.c (indirect_refs_may_alias_p): Do not
treat arrays with same type as objects that cannot overlap.
2016-12-01 Georg-Johann Lay <avr@gjlay.de>
* config/avr/avr.c (avr_print_operand): Use SYMBOL_REF_P if possible.
2016-12-01 Richard Biener <rguenther@suse.de>
* gcc.dg/torture/alias-2.c: New testcase.
2016-12-01 Georg-Johann Lay <avr@gjlay.de>
* gcc.target/avr/tiny-memx.c: Only perform if target avr_tiny.
......
/* { dg-do run } */
/* We do not want to treat int[3] as an object that cannot overlap
itself but treat it as arbitrary sub-array of a larger array object. */
int ar1(int (*p)[3], int (*q)[3])
{
(*p)[0] = 1;
(*q)[1] = 2;
return (*p)[0];
}
int main()
{
int a[4];
if (ar1 ((int (*)[3])&a[1], (int (*)[3])&a[0]) != 2)
__builtin_abort ();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment