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 
10 void
foo(Nrrd * nout,Nrrd * nin,const NrrdKernel * kernel,const double * parm,const int * samples,const double * scalings)11 foo (Nrrd *nout, Nrrd *nin, const NrrdKernel *kernel, const double *parm,
12      const int *samples, const double *scalings)
13 {
14   Info *info;
15   int d, p, np, center;
16   for (d=0; d<nin->dim; d++)
17     {
18       info->kernel[d] = kernel;
19       if (samples)
20 	info->samples[d] = samples[d];
21       else
22 	{
23 	  center = _nrrdCenter(nin->axis[d].center);
24 	  if (nrrdCenterCell == center)
25 	    info->samples[d] = nin->axis[d].size*scalings[d];
26 	  else
27 	    info->samples[d] = (nin->axis[d].size - 1)*scalings[d] + 1;
28 	}
29     }
30 }
31