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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [inline-2.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do link } */
2
/* { dg-options "-O" } */
3
 
4
/* When optimized we expect the call to foo () in bar to be inlined
5
   and the call to link_error optimized away.  */
6
 
7
extern void link_error (void);
8
inline int __attribute__((always_inline)) foo(void) { return 0; }
9
 
10
int main()
11
{
12
  int (*fn)(void) = foo;
13
  if (fn())
14
    link_error ();
15
  return 0;
16
}
17
 

powered by: WebSVN 2.1.0

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