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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [inline-1.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* Verify that DECL_INLINE gets copied between DECLs properly.  */
2
/* { dg-do compile } */
3
/* { dg-options "-O1" } */
4
/* { dg-final { if [ istarget hppa*-*-* ] { scan-assembler-not "xyzzy?,%r" } else { scan-assembler-not "xyzzy" } } } */
5
 
6
/* Test that declaration followed by definition inlines.  */
7
static inline int xyzzy0 (int);
8
static int xyzzy0 (int x) { return x; }
9
int test0 (void)
10
{
11
  return xyzzy0 (5);
12
}
13
 
14
/* Test that definition following declaration inlines.  */
15
static int xyzzy1 (int);
16
static inline int xyzzy1 (int x) { return x; }
17
int test1 (void)
18
{
19
  return xyzzy1 (5);
20
}
21
 
22
/* Test that redeclaration inside a function body inlines.  */
23
extern inline int xyzzy2 (int x) { return x; }
24
int test2 (void)
25
{
26
  extern int xyzzy2 (int);
27
  return xyzzy2 (5);
28
}

powered by: WebSVN 2.1.0

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