]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.base/all-types.c
Initial creation of sourceware repository
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / all-types.c
1 /*
2 * the basic C types.
3 */
4
5 #if !defined (__STDC__) && !defined (_AIX)
6 #define signed /**/
7 #endif
8
9 char v_char;
10 signed char v_signed_char;
11 unsigned char v_unsigned_char;
12
13 short v_short;
14 signed short v_signed_short;
15 unsigned short v_unsigned_short;
16
17 int v_int;
18 signed int v_signed_int;
19 unsigned int v_unsigned_int;
20
21 long v_long;
22 signed long v_signed_long;
23 unsigned long v_unsigned_long;
24
25 float v_float;
26 double v_double;
27
28 int main ()
29 {
30 extern void dummy();
31 #ifdef usestubs
32 set_debug_traps();
33 breakpoint();
34 #endif
35 dummy();
36 return 0;
37
38 }
39
40 void dummy()
41 {
42 /* Some linkers (e.g. on AIX) remove unreferenced variables,
43 so make sure to reference them. */
44 v_char = 'A';
45 v_signed_char = 'B';
46 v_unsigned_char = 'C';
47
48 v_short = 3;
49 v_signed_short = 4;
50 v_unsigned_short = 5;
51
52 v_int = 6;
53 v_signed_int = 7;
54 v_unsigned_int = 8;
55
56 v_long = 9;
57 v_signed_long = 10;
58 v_unsigned_long = 11;
59
60 v_float = 100.343434;
61 v_double = 200.565656;
62 }