Commit | Line | Data |
---|---|---|
c906108c SS |
1 | /* pr 13484 */ |
2 | ||
3 | #include <stdio.h> | |
4 | ||
5 | int x; | |
6 | ||
7 | void foo() | |
8 | { | |
9 | x++; | |
10 | printf("This is foo\n"); | |
11 | } | |
12 | ||
13 | int main() | |
14 | { | |
c906108c SS |
15 | foo(); |
16 | return 0; | |
17 | } | |
f6eeced0 JK |
18 | |
19 | /* Ensure the new file will have more sections. It may exploit code not | |
20 | updating its SECTION_COUNT on reread_symbols. */ | |
21 | ||
22 | #ifndef NO_SECTIONS | |
23 | # define VAR0(n) __attribute__ ((section ("sect" #n))) int var##n; | |
24 | # define VAR1(n) VAR0 (n ## 0) VAR0(n ## 1) VAR0(n ## 2) VAR0(n ## 3) | |
25 | # define VAR2(n) VAR1 (n ## 0) VAR1(n ## 1) VAR1(n ## 2) VAR1(n ## 3) | |
26 | # define VAR3(n) VAR2 (n ## 0) VAR2(n ## 1) VAR2(n ## 2) VAR2(n ## 3) | |
27 | VAR3 (0) | |
28 | #endif |