| 1 |
/* { dg-do run { target fpic } } */ |
| 2 |
/* { dg-options "-O2 -fpic" } */ |
| 3 |
|
| 4 |
extern void exit (int); |
| 5 |
|
| 6 |
void foo1(int a, char *b, int c) |
| 7 |
{ |
| 8 |
c =a+c+234; |
| 9 |
} |
| 10 |
|
| 11 |
int foo2(int d) |
| 12 |
{ |
| 13 |
return d*d; |
| 14 |
} |
| 15 |
|
| 16 |
int bar1, bar2, bar3; |
| 17 |
char * bar4; |
| 18 |
|
| 19 |
int main(void) { |
| 20 |
int h; |
| 21 |
bar1 = foo2(1); |
| 22 |
bar2 = foo2(1); |
| 23 |
|
| 24 |
h = foo2(1); |
| 25 |
foo1(1, "a", foo2(1)); |
| 26 |
foo1(bar1, "a", foo2(1)); |
| 27 |
foo2(1); |
| 28 |
|
| 29 |
h = foo2(1); |
| 30 |
bar3 = 1; |
| 31 |
bar4 = "a"; |
| 32 |
foo1(1, "n", foo2(1)); |
| 33 |
foo1(1, "o", foo2(1)); |
| 34 |
foo1(1, "p", foo2(1)); |
| 35 |
foo1(bar1, "a", foo2(1)); |
| 36 |
|
| 37 |
bar3 = h; |
| 38 |
bar4 = "b"; foo1(bar1, "b", foo2(1)); |
| 39 |
foo1(1, "q", foo2(1)); |
| 40 |
bar4 = "c"; foo1(1, "c", foo2(1)); |
| 41 |
bar4 = "d"; foo1(1, "d", foo2(1)); |
| 42 |
bar4 = "e"; foo1(1, "e", foo2(1)); |
| 43 |
bar4 = "f"; foo1(1, "f", foo2(1)); |
| 44 |
bar4 = "g"; foo1(1, "g", foo2(1)); |
| 45 |
bar4 = "h"; foo1(1, "h", foo2(1)); |
| 46 |
bar4 = "i"; foo1(1, "i", foo2(1)); |
| 47 |
bar4 = "j"; foo1(1, "j", foo2(1)); |
| 48 |
bar4 = "k"; foo1(1, "k", foo2(1)); |
| 49 |
bar4 = "l"; foo1(1, "l", foo2(1)); |
| 50 |
bar4 = "m"; |
| 51 |
foo1(bar2, "m", foo2(1)); |
| 52 |
exit(0); |
| 53 |
} |