This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Handle V_C_E<&foo> in PTA
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 17 Apr 2009 21:57:01 +0200 (CEST)
- Subject: [PATCH] Handle V_C_E<&foo> in PTA
We can get this with the new SRA.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.
Richard.
2009-04-17 Richard Guenther <rguenther@suse.de>
* tree-ssa-structalias.c (get_constraint_for_component_ref):
Handle component references view-converting an invariant address.
Index: gcc/tree-ssa-structalias.c
===================================================================
--- gcc/tree-ssa-structalias.c (revision 146280)
+++ gcc/tree-ssa-structalias.c (working copy)
@@ -3052,6 +3052,14 @@ get_constraint_for_component_ref (tree t
else
result->offset = bitpos;
}
+ else if (result->type == ADDRESSOF)
+ {
+ /* We can end up here for component references on a
+ VIEW_CONVERT_EXPR <>(&foobar). */
+ result->type = SCALAR;
+ result->var = anything_id;
+ result->offset = 0;
+ }
else
gcc_unreachable ();
}