PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr47286.c
blob91a7da7ae54ecdb95be5d136af4f263d8f70eb8e
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");
9 return sp;
11 void testcase(void)
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" } } */