import gdb-1999-06-28 snapshot
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / shmain.c
CommitLineData
c906108c
SS
1/* A test */
2
3#include "ss.h"
4#include <stdio.h>
5
085dd6e6
JM
6extern int structarg(struct s);
7extern int pstructarg(struct s*);
8extern int shr1(int);
9extern int shr2(int);
c906108c
SS
10extern float sg;
11
12int eglob;
13
14struct {
15 int a;
16 int b;
17} s;
18
19int g;
20
085dd6e6
JM
21#ifdef PROTOTYPES
22int local_structarg(struct s x)
23#else
c906108c
SS
24int local_structarg(x)
25struct s x;
085dd6e6 26#endif
c906108c
SS
27{
28 return x.b;
29}
30
085dd6e6
JM
31#ifdef PROTOTYPES
32int mainshr1(int g)
33#else
34int mainshr1(g)
35int g;
36#endif
37{
38 return 2*g;
39}
40
41int main()
c906108c
SS
42{
43 struct s y;
44 g = 1;
45 g = shr1(g);
46 g = shr2(g);
47 g = mainshr1(g);
48 sg = 1.1;
49 printf("address of sg is 0x%x\n", &sg);
50 y.a = 3;
51 y.b = 4;
52 g = local_structarg(y);
53 g = structarg(y);
54 g = pstructarg(&y);
085dd6e6 55 return 0;
c906108c 56}
This page took 0.080142 seconds and 4 git commands to generate.