+2011-01-14 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/47286
+ * tree-ssa-structalias.c (new_var_info): Register variables
+ are global.
+
2011-01-14 Martin Jambor <mjambor@suse.cz>
PR middle-end/46823
+2011-01-14 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/47286
+ * gcc.dg/tree-ssa/pr47286.c: New testcase.
+
2011-01-13 Kai Tietz <kai.tietz@onevision.com>
PR c++/47213
--- /dev/null
+/* { dg-do compile } */
+/* { dg-skip-if "" { ! { i?86-*-* x86_64-*-* } } { "*" } { "" } } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+struct thread_info { int preempt_count; };
+static inline struct thread_info *current_thread_info(void)
+{
+ register struct thread_info *sp asm("esp");
+ return sp;
+}
+void testcase(void)
+{
+ current_thread_info()->preempt_count += 1;
+}
+
+/* We have to make sure that alias analysis treats sp as pointing
+ to globals and thus the store not optimized away. */
+
+/* { dg-final { scan-tree-dump "->preempt_count =" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
ret->is_global_var = (t == NULL_TREE);
ret->is_fn_info = false;
if (t && DECL_P (t))
- ret->is_global_var = is_global_var (t);
+ ret->is_global_var = (is_global_var (t)
+ /* We have to treat even local register variables
+ as escape points. */
+ || (TREE_CODE (t) == VAR_DECL && DECL_REGISTER (t)));
ret->solution = BITMAP_ALLOC (&pta_obstack);
ret->oldsolution = BITMAP_ALLOC (&oldpta_obstack);
ret->next = NULL;