This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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 ();
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]