re PR middle-end/41261 (ice with -O2 -fprofile-arcs when compiling Linux kernel)

2009-09-06  Richard Guenther  <rguenther@suse.de>

	PR middle-end/41261
	* tree-ssa-alias.c (refs_may_alias_p_1): Bail out for function decls.

	* gcc.dg/torture/pr41261.c: New testcase.

From-SVN: r151460
This commit is contained in:
Richard Guenther 2009-09-06 16:48:41 +00:00 committed by Richard Biener
parent f7d601a5bd
commit 3c45b96b27
4 changed files with 24 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2009-09-06 Richard Guenther <rguenther@suse.de>
PR middle-end/41261
* tree-ssa-alias.c (refs_may_alias_p_1): Bail out for function decls.
2009-09-05 Richard Guenther <rguenther@suse.de>
PR middle-end/41181

View File

@ -1,3 +1,8 @@
2009-09-06 Richard Guenther <rguenther@suse.de>
PR middle-end/41261
* gcc.dg/torture/pr41261.c: New testcase.
2009-09-05 Richard Guenther <rguenther@suse.de>
PR middle-end/41181

View File

@ -0,0 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-fprofile-arcs" } */
extern void relocate_kernel();
void machine_kexec(void *control_page)
{
__builtin_memcpy(control_page, relocate_kernel, 2048);
}

View File

@ -784,6 +784,12 @@ refs_may_alias_p_1 (ao_ref *ref1, ao_ref *ref2, bool tbaa_p)
|| is_gimple_min_invariant (base2))
return false;
/* We can end up refering to code via function decls. As we likely
do not properly track code aliases conservatively bail out. */
if (TREE_CODE (base1) == FUNCTION_DECL
|| TREE_CODE (base2) == FUNCTION_DECL)
return true;
/* Defer to simple offset based disambiguation if we have
references based on two decls. Do this before defering to
TBAA to handle must-alias cases in conformance with the