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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* Test -fno-gnu89-extern-inline.  */
2
/* { dg-do compile } */
3
/* { dg-options "-std=c99 -fno-gnu89-inline" } */
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
#ifdef __GNUC_GNU_INLINE__
16
#error __GNUC_GNU_INLINE__ is defined
17
#endif
18
 
19
#ifndef __GNUC_STDC_INLINE__
20
#error __GNUC_STDC_INLINE__ is not defined
21
#endif
22
 
23
inline int dontgenerate1 (void)
24
{
25
  return 1;
26
}
27
 
28
inline int dontgenerate2 (void);
29
inline int dontgenerate2 (void)
30
{
31
  return 2;
32
}
33
 
34
inline int dontgenerate3 (void)
35
{
36
  return 3;
37
}
38
inline int dontgenerate3 (void);
39
 
40
extern inline int func1 (void) { return 1; }
41
 
42
extern inline int func2 (void);
43
inline int func2 (void) { return 2; }
44
 
45
inline int func3 (void) { return 3; }
46
extern inline int func3 (void);
47
 
48
inline int func4 (void);
49
extern inline int func4 (void) { return 4; }
50
 
51
extern inline int func5 (void) { return 5; }
52
inline int func5 (void);
53
 
54
extern int func6 (void);
55
inline int func6 (void) { return 6; }
56
 
57
inline int func7 (void) { return 7; }
58
extern int func7 (void);
59
 
60
inline int func8 (void);
61
extern int func8 (void) { return 8; }
62
 
63
extern int func9 (void) { return 9; }
64
inline int func9 (void);

powered by: WebSVN 2.1.0

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