OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [pr47286.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-skip-if "" { ! { i?86-*-* x86_64-*-* } } { "*" } { "" } } */
3
/* { dg-options "-O2 -fdump-tree-optimized" } */
4
 
5
struct thread_info { int preempt_count; };
6
static inline struct thread_info *current_thread_info(void)
7
{
8
  register struct thread_info *sp asm("esp");
9
  return sp;
10
}
11
void testcase(void)
12
{
13
  current_thread_info()->preempt_count += 1;
14
}
15
 
16
/* We have to make sure that alias analysis treats sp as pointing
17
   to globals and thus the store not optimized away.  */
18
 
19
/* { dg-final { scan-tree-dump "->preempt_count =" "optimized" } } */
20
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.