]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.base/shmain.c
Initial creation of sourceware repository
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / shmain.c
1 /* A test */
2
3 #include "ss.h"
4 #include <stdio.h>
5
6 extern int shr1();
7 extern int shr2();
8 extern float sg;
9
10 int eglob;
11
12 struct {
13 int a;
14 int b;
15 } s;
16
17 int g;
18
19 int local_structarg(x)
20 struct s x;
21 {
22 return x.b;
23 }
24
25 main()
26 {
27 struct s y;
28 g = 1;
29 g = shr1(g);
30 g = shr2(g);
31 g = mainshr1(g);
32 sg = 1.1;
33 printf("address of sg is 0x%x\n", &sg);
34 y.a = 3;
35 y.b = 4;
36 g = local_structarg(y);
37 g = structarg(y);
38 g = pstructarg(&y);
39
40 return (0);
41 }
42
43 int mainshr1(g)
44 int g;
45 {
46 return 2*g;
47 }