Showing the changes to tests (2 of 2 files). Show all
Unified · Split
| @@ -1,5 +1,26 @@ | |||
| 1 | #include <tcclib.h> | 1 | #include <tcclib.h> |
| 2 | 2 | ||
| 3 | static int glob_i = 0; | ||
| 4 | |||
| 5 | void incr_glob_i(int *i) | ||
| 6 | { | ||
| 7 | glob_i += *i; | ||
| 8 | } | ||
| 9 | |||
| 10 | #define INCR_GI { \ | ||
| 11 | int i __attribute__ ((__cleanup__(incr_glob_i))) = 1; \ | ||
| 12 | } | ||
| 13 | |||
| 14 | #define INCR_GI0 INCR_GI INCR_GI INCR_GI INCR_GI | ||
| 15 | #define INCR_GI1 INCR_GI0 INCR_GI0 INCR_GI0 INCR_GI0 | ||
| 16 | #define INCR_GI2 INCR_GI1 INCR_GI1 INCR_GI1 INCR_GI1 | ||
| 17 | #define INCR_GI3 INCR_GI2 INCR_GI2 INCR_GI2 INCR_GI2 | ||
| 18 | #define INCR_GI4 INCR_GI3 INCR_GI3 INCR_GI3 INCR_GI3 | ||
| 19 | #define INCR_GI5 INCR_GI4 INCR_GI4 INCR_GI4 INCR_GI4 | ||
| 20 | #define INCR_GI6 INCR_GI5 INCR_GI5 INCR_GI5 INCR_GI5 | ||
| 21 | #define INCR_GI7 INCR_GI6 INCR_GI6 INCR_GI6 INCR_GI6 | ||
| 22 | |||
| 23 | |||
| 3 | void check2(char **hum); | 24 | void check2(char **hum); |
| 4 | 25 | ||
| 5 | void check(int *j) | 26 | void check(int *j) |
| @@ -103,7 +124,9 @@ int main() · 97 unmodified lines | |||
| 103 | __attribute__ ((__cleanup__(check_oh_i))) char oh_i = 'o', o = 'a'; | 124 | __attribute__ ((__cleanup__(check_oh_i))) char oh_i = 'o', o = 'a'; |
| 104 | } | 125 | } |
| 105 | 126 | ||
| 106 | naaaaaaaa: | 127 | INCR_GI7; |
| 128 | printf("glob_i: %d\n", glob_i); | ||
| 129 | naaaaaaaa: | ||
| 107 | if (!chk) { | 130 | if (!chk) { |
| 108 | __attribute__ ((__cleanup__(check_oh_i))) char oh_i = 'f'; | 131 | __attribute__ ((__cleanup__(check_oh_i))) char oh_i = 'f'; |
| 109 | double __attribute__ ((__cleanup__(goto_hell))) f = 2.6; | 132 | double __attribute__ ((__cleanup__(goto_hell))) f = 2.6; |
| @@ -1,5 +1,6 @@ | |||
| 1 | c: a | 1 | c: a |
| 2 | c: o | 2 | c: o |
| 3 | glob_i: 65536 | ||
| 3 | oo: 2.600000 | 4 | oo: 2.600000 |
| 4 | c: f | 5 | c: f |
| 5 | str: I don't think this should be print(but gcc got it wrong too) | 6 | str: I don't think this should be print(but gcc got it wrong too) |