OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [inline-13.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* Verify basic C99 inline functionality.  */
2
/* { dg-do compile } */
3
/* { dg-options "-std=c99" } */
4
/* { dg-final { scan-assembler-not "dontgenerate" } } */
5
/* { dg-final { scan-assembler "func1" } } */
6
/* { dg-final { scan-assembler "func2" } } */
7
/* { dg-final { scan-assembler "func3" } } */
8
/* { dg-final { scan-assembler "func4" } } */
9
/* { dg-final { scan-assembler "func5" } } */
10
/* { dg-final { scan-assembler "func6" } } */
11
/* { dg-final { scan-assembler "func7" } } */
12
/* { dg-final { scan-assembler "func8" } } */
13
/* { dg-final { scan-assembler "func9" } } */
14
 
15
inline int dontgenerate1 (void)
16
{
17
  return 1;
18
}
19
 
20
inline int dontgenerate2 (void);
21
inline int dontgenerate2 (void)
22
{
23
  return 2;
24
}
25
 
26
inline int dontgenerate3 (void)
27
{
28
  return 3;
29
}
30
inline int dontgenerate3 (void);
31
 
32
extern inline int func1 (void) { return 1; }
33
 
34
extern inline int func2 (void);
35
inline int func2 (void) { return 2; }
36
 
37
inline int func3 (void) { return 3; }
38
extern inline int func3 (void);
39
 
40
inline int func4 (void);
41
extern inline int func4 (void) { return 4; }
42
 
43
extern inline int func5 (void) { return 5; }
44
inline int func5 (void);
45
 
46
extern int func6 (void);
47
inline int func6 (void) { return 6; }
48
 
49
inline int func7 (void) { return 7; }
50
extern int func7 (void);
51
 
52
inline int func8 (void);
53
extern int func8 (void) { return 8; }
54
 
55
extern int func9 (void) { return 9; }
56
inline int func9 (void);

powered by: WebSVN 2.1.0

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