]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/gcc.c-torture/compile/pr48596.c
GCC port for eBPF
[gcc.git] / gcc / testsuite / gcc.c-torture / compile / pr48596.c
CommitLineData
13bd57a1 1/* PR target/48596 */
91dfef96
JM
2/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
3
9747719a
OE
4enum { nrrdCenterUnknown, nrrdCenterNode, nrrdCenterCell, nrrdCenterLast };
5typedef struct { int size; int center; } NrrdAxis;
6typedef struct { int dim; NrrdAxis axis[10]; } Nrrd;
7typedef struct { } NrrdKernel;
8typedef struct { const NrrdKernel *kernel[10]; int samples[10]; } Info;
9
10void
11foo (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}
This page took 4.689918 seconds and 5 git commands to generate.