1 /* { dg-do compile } */
2 /* { dg-skip-if "" { ! { i?86-*-* x86_64-*-* } } } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
5 struct thread_info
{ int preempt_count
; };
6 static inline struct thread_info
*current_thread_info(void)
8 register struct thread_info
*sp
asm("esp");
13 current_thread_info()->preempt_count
+= 1;
16 /* We have to make sure that alias analysis treats sp as pointing
17 to globals and thus the store not optimized away. */
19 /* { dg-final { scan-tree-dump "->preempt_count =" "optimized" } } */