| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-O2 -foptimize-sibling-calls" } */ |
| 3 |
|
| 4 |
typedef struct { |
| 5 |
int data[4]; |
| 6 |
} arr16_t; |
| 7 |
|
| 8 |
int result = 0; |
| 9 |
|
| 10 |
void func2(int i, int j, arr16_t arr) |
| 11 |
{ |
| 12 |
result = (arr.data[0] != 1 |
| 13 |
|| arr.data[1] != 2 |
| 14 |
|| arr.data[2] != 3 |
| 15 |
|| arr.data[3] != 4); |
| 16 |
} |
| 17 |
|
| 18 |
void func1(int i, int j, int k, arr16_t a) |
| 19 |
{ |
| 20 |
func2(i, j, a); |
| 21 |
} |
| 22 |
|
| 23 |
int main(int argc, const char *argv[]) |
| 24 |
{ |
| 25 |
arr16_t arr = {{1, 2, 3, 4}}; |
| 26 |
|
| 27 |
func1(0, 0, 0, arr); |
| 28 |
return result; |
| 29 |
} |
| 30 |
|