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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.1/] [gdb/] [testsuite/] [gdb.opt/] [inline-cmds.c] - Blame information for rev 227

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
/* Copyright (C) 2008, 2010 Free Software Foundation, Inc.
2
 
3
   This program is free software; you can redistribute it and/or modify
4
   it under the terms of the GNU General Public License as published by
5
   the Free Software Foundation; either version 3 of the License, or
6
   (at your option) any later version.
7
 
8
   This program is distributed in the hope that it will be useful,
9
   but WITHOUT ANY WARRANTY; without even the implied warranty of
10
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
   GNU General Public License for more details.
12
 
13
   You should have received a copy of the GNU General Public License
14
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
15
 
16
int x, y;
17
volatile int result;
18
 
19
void bar(void);
20
void marker(void);
21
void noinline(void);
22
 
23
inline int func1(void)
24
{
25
  bar ();
26
  return x * y;
27
}
28
 
29
inline int func2(void)
30
{
31
  return x * func1 ();
32
}
33
 
34
inline void func3(void)
35
{
36
  bar ();
37
}
38
 
39
inline void outer_inline1(void)
40
{
41
  noinline ();
42
}
43
 
44
inline void outer_inline2(void)
45
{
46
  outer_inline1 ();
47
}
48
 
49
int main (void)
50
{ /* start of main */
51
  int val;
52
 
53
  x = 7;
54
  y = 8;
55
 
56
  result = func1 ();
57
  result = func2 ();
58
  marker ();
59
 
60
  result = 0;
61
  result = 0; /* set breakpoint 3 here */
62
 
63
  func1 (); /* first call */
64
  func1 (); /* second call */
65
  marker ();
66
 
67
  result = 0;
68
  result = 0; /* set breakpoint 4 here */
69
 
70
  func1 ();
71
  func3 ();
72
  marker ();
73
 
74
  result = 0;
75
  result = 0; /* set breakpoint 5 here */
76
 
77
  marker ();
78
  func1 ();
79
  func3 ();
80
  marker ();  /* set breakpoint 6 here */
81
 
82
  outer_inline2 ();
83
 
84
  return 0;
85
}

powered by: WebSVN 2.1.0

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