| OLD | NEW |
| 1 /* This table is used as a source for every ascii character. | 1 /* This table is used as a source for every ascii character. |
| 2 It is explicitly unsigned to avoid differences due to native characters | 2 It is explicitly unsigned to avoid differences due to native characters |
| 3 being either signed or unsigned. */ | 3 being either signed or unsigned. */ |
| 4 #include <stdlib.h> | 4 #include <stdlib.h> |
| 5 unsigned char ctable1[256] = { | 5 unsigned char ctable1[256] = { |
| 6 0000, 0001, 0002, 0003, 0004, 0005, 0006, 0007, | 6 0000, 0001, 0002, 0003, 0004, 0005, 0006, 0007, |
| 7 0010, 0011, 0012, 0013, 0014, 0015, 0016, 0017, | 7 0010, 0011, 0012, 0013, 0014, 0015, 0016, 0017, |
| 8 0020, 0021, 0022, 0023, 0024, 0025, 0026, 0027, | 8 0020, 0021, 0022, 0023, 0024, 0025, 0026, 0027, |
| 9 0030, 0031, 0032, 0033, 0034, 0035, 0036, 0037, | 9 0030, 0031, 0032, 0033, 0034, 0035, 0036, 0037, |
| 10 0040, 0041, 0042, 0043, 0044, 0045, 0046, 0047, | 10 0040, 0041, 0042, 0043, 0044, 0045, 0046, 0047, |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 struct some_arrays *parrays = &arrays; | 91 struct some_arrays *parrays = &arrays; |
| 92 | 92 |
| 93 enum some_volatile_enum { enumvolval1, enumvolval2 }; | 93 enum some_volatile_enum { enumvolval1, enumvolval2 }; |
| 94 | 94 |
| 95 /* A volatile enum variable whose name is the same as the enumeration | 95 /* A volatile enum variable whose name is the same as the enumeration |
| 96 name. See PR11827. */ | 96 name. See PR11827. */ |
| 97 volatile enum some_volatile_enum some_volatile_enum = enumvolval1; | 97 volatile enum some_volatile_enum some_volatile_enum = enumvolval1; |
| 98 | 98 |
| 99 enum flag_enum { ONE = 1, TWO = 2 }; |
| 100 |
| 101 enum flag_enum three = ONE | TWO; |
| 102 |
| 99 /* A structure with an embedded array at an offset > 0. The array has | 103 /* A structure with an embedded array at an offset > 0. The array has |
| 100 all elements with the same repeating value, which must not be the | 104 all elements with the same repeating value, which must not be the |
| 101 same as the value of the preceding fields in the structure for the | 105 same as the value of the preceding fields in the structure for the |
| 102 test to be effective. This tests whether GDB uses the correct | 106 test to be effective. This tests whether GDB uses the correct |
| 103 element content offsets (relative to the complete `some_struct' | 107 element content offsets (relative to the complete `some_struct' |
| 104 value) when counting value repetitions. */ | 108 value) when counting value repetitions. */ |
| 105 struct some_struct | 109 struct some_struct |
| 106 { | 110 { |
| 107 int a; | 111 int a; |
| 108 int b; | 112 int b; |
| 109 unsigned char array[20]; | 113 unsigned char array[20]; |
| 110 } some_struct = { | 114 } some_struct = { |
| 111 0x12345678, | 115 0x12345678, |
| 112 0x87654321, | 116 0x87654321, |
| 113 { | 117 { |
| 114 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, | 118 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 115 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, | 119 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 116 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, | 120 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, |
| 117 0xaa, 0xaa, 0xaa, 0xaa, 0xaa | 121 0xaa, 0xaa, 0xaa, 0xaa, 0xaa |
| 118 } | 122 } |
| 119 }; | 123 }; |
| 120 | 124 |
| 121 /* -- */ | 125 /* -- */ |
| 122 | 126 |
| 123 int main () | 127 int main () |
| 124 { | 128 { |
| 125 #ifdef usestubs | |
| 126 set_debug_traps(); | |
| 127 breakpoint(); | |
| 128 #endif | |
| 129 malloc(1); | 129 malloc(1); |
| 130 | 130 |
| 131 /* Prevent AIX linker from removing variables. */ | 131 /* Prevent AIX linker from removing variables. */ |
| 132 return ctable1[0] + ctable2[0] + int1dim[0] + int2dim[0][0] | 132 return ctable1[0] + ctable2[0] + int1dim[0] + int2dim[0][0] |
| 133 + int3dim[0][0][0] + int4dim[0][0][0][0] + teststring[0] + | 133 + int3dim[0][0][0] + int4dim[0][0][0][0] + teststring[0] + |
| 134 *parrays -> array1 + a1[0] + a2[0]; | 134 *parrays -> array1 + a1[0] + a2[0]; |
| 135 } | 135 } |
| OLD | NEW |