| 1 |
/* PR rtl-optimization/79574 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-Os --param gcse-cost-distance-ratio=2147483647" } */ |
| 4 |
|
| 5 |
#include "stdarg.h" |
| 6 |
|
| 7 |
int buf[100]; |
| 8 |
int buf1[10]; |
| 9 |
|
| 10 |
int rd (int *pppp, int n, ...) |
| 11 |
{ |
| 12 |
va_list argp; |
| 13 |
int *p; |
| 14 |
int i; |
| 15 |
int res; |
| 16 |
|
| 17 |
va_start (argp, n); |
| 18 |
for (; n > 0; n--) |
| 19 |
va_arg (argp, double); |
| 20 |
p = va_arg (argp, int *); |
| 21 |
i = va_arg (argp, int); |
| 22 |
|
| 23 |
res = p[i]; |
| 24 |
__builtin_printf ("%d\n", res); |
| 25 |
|
| 26 |
return res; |
| 27 |
} |
| 28 |
|
| 29 |
int mpx_test (int argc, const char **argv) |
| 30 |
{ |
| 31 |
rd (buf1, 2, 10.0d, 10.0d, buf, 100, buf1); |
| 32 |
return 0; |
| 33 |
} |