Commit 1a15bfdc by Richard Guenther Committed by Richard Biener

ipa-prop.c (compute_complex_pass_through): If we cannot compute a non-varying…

ipa-prop.c (compute_complex_pass_through): If we cannot compute a non-varying offset for IPA_JF_ANCESTOR punt.

2009-08-14  Richard Guenther  <rguenther@suse.de>

	* ipa-prop.c (compute_complex_pass_through): If we cannot
	compute a non-varying offset for IPA_JF_ANCESTOR punt.

	* gcc.c-torture/execute/20090814-1.c: New testcase.

From-SVN: r150757
parent 065312cf
2009-08-14 Richard Guenther <rguenther@suse.de>
* ipa-prop.c (compute_complex_pass_through): If we cannot
compute a non-varying offset for IPA_JF_ANCESTOR punt.
2009-08-14 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> 2009-08-14 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
* c-lex.c (c_lex_with_flags): Increase size of local variable * c-lex.c (c_lex_with_flags): Increase size of local variable
......
...@@ -377,7 +377,10 @@ compute_complex_pass_through (struct ipa_node_params *info, ...@@ -377,7 +377,10 @@ compute_complex_pass_through (struct ipa_node_params *info,
type = TREE_TYPE (op1); type = TREE_TYPE (op1);
op1 = get_ref_base_and_extent (op1, &offset, &size, &max_size); op1 = get_ref_base_and_extent (op1, &offset, &size, &max_size);
if (TREE_CODE (op1) != INDIRECT_REF) if (TREE_CODE (op1) != INDIRECT_REF
/* If this is a varying address, punt. */
|| max_size == -1
|| max_size != size)
return; return;
op1 = TREE_OPERAND (op1, 0); op1 = TREE_OPERAND (op1, 0);
if (TREE_CODE (op1) != SSA_NAME if (TREE_CODE (op1) != SSA_NAME
......
2009-08-14 Richard Guenther <rguenther@suse.de>
* gcc.c-torture/execute/20090814-1.c: New testcase.
2009-08-14 David Edelsohn <edelsohn@gnu.org> 2009-08-14 David Edelsohn <edelsohn@gnu.org>
* gcc.dg/graphite/graphite_autopar: Move to libgomp testsuite. * gcc.dg/graphite/graphite_autopar: Move to libgomp testsuite.
......
int __attribute__((noinline))
bar (int *a)
{
return *a;
}
int i;
int __attribute__((noinline))
foo (int (*a)[2])
{
return bar (&(*a)[i]);
}
extern void abort (void);
int a[2];
int main()
{
a[0] = -1;
a[1] = 42;
i = 1;
if (foo (&a) != 42)
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