| 1 |
/* PR target/48596 */ |
| 2 |
/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */ |
| 3 |
|
| 4 |
enum { nrrdCenterUnknown, nrrdCenterNode, nrrdCenterCell, nrrdCenterLast }; |
| 5 |
typedef struct { int size; int center; } NrrdAxis; |
| 6 |
typedef struct { int dim; NrrdAxis axis[10]; } Nrrd; |
| 7 |
typedef struct { } NrrdKernel; |
| 8 |
typedef struct { const NrrdKernel *kernel[10]; int samples[10]; } Info; |
| 9 |
int _nrrdCenter(int); |
| 10 |
|
| 11 |
void |
| 12 |
foo (Nrrd *nout, Nrrd *nin, const NrrdKernel *kernel, const double *parm, |
| 13 |
const int *samples, const double *scalings) |
| 14 |
{ |
| 15 |
Info *info; |
| 16 |
int d, p, np, center; |
| 17 |
for (d=0; d<nin->dim; d++) |
| 18 |
{ |
| 19 |
info->kernel[d] = kernel; |
| 20 |
if (samples) |
| 21 |
info->samples[d] = samples[d]; |
| 22 |
else |
| 23 |
{ |
| 24 |
center = _nrrdCenter(nin->axis[d].center); |
| 25 |
if (nrrdCenterCell == center) |
| 26 |
info->samples[d] = nin->axis[d].size*scalings[d]; |
| 27 |
else |
| 28 |
info->samples[d] = (nin->axis[d].size - 1)*scalings[d] + 1; |
| 29 |
} |
| 30 |
} |
| 31 |
} |