import gdb-1999-06-28 snapshot
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / scope1.c
CommitLineData
c906108c
SS
1static int filelocal = 2; /* In Data section */
2static int filelocal_bss; /* In BSS section */
3#ifndef __STDC__
4#define const /**/
5#endif
6static const int filelocal_ro = 202; /* In Read-Only Data section */
7
085dd6e6 8void foo ()
c906108c 9{
085dd6e6
JM
10
11 void bar ();
12
c906108c
SS
13 static int funclocal = 3; /* In Data section */
14 static int funclocal_bss; /* In BSS section */
15 static const int funclocal_ro = 203; /* RO Data */
16 static const int funclocal_ro_bss; /* RO Data */
17
18 funclocal_bss = 103;
19 bar ();
20}
21
085dd6e6 22void bar ()
c906108c
SS
23{
24 static int funclocal = 4; /* In data section */
25 static int funclocal_bss; /* In BSS section */
26 funclocal_bss = 104;
27}
28
085dd6e6 29void init1 ()
c906108c
SS
30{
31 filelocal_bss = 102;
32}
33
34/* On some systems, such as AIX, unreferenced variables are deleted
35 from the executable. */
085dd6e6 36void usestatics1 ()
c906108c 37{
085dd6e6
JM
38 void useit1 (int val);
39
c906108c
SS
40 useit1 (filelocal);
41 useit1 (filelocal_bss);
42 useit1 (filelocal_ro);
43}
44
085dd6e6
JM
45#ifdef PROTOTYPES
46void useit1 (int val)
47#else
48void useit1 (val) int val;
49#endif
c906108c
SS
50{
51 static int usedval;
52
53 usedval = val;
54}
This page took 0.02939 seconds and 4 git commands to generate.