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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [opt/] [inline9.C] - Blame information for rev 825

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// PR c++/17972
2
// Origin: Michal Ostrowski 
3
// Testcase by Alan Modra 
4
// { dg-do run }
5
// { dg-options "-O" }
6
// { dg-options "-O -mtune=i686" { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
7
 
8
struct thread_info
9
{
10
  short preempt_count;
11
} x;
12
 
13
static inline struct thread_info *cti (void) __attribute__ ((const));
14
static inline struct thread_info *cti (void)
15
{
16
  return &x;
17
}
18
 
19
void fn (void) __attribute__ ((noinline));
20
void fn (void)
21
{
22
  ++cti()->preempt_count;
23
}
24
 
25
int main (void)
26
{
27
  fn ();
28
  return 0;
29
}

powered by: WebSVN 2.1.0

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