re PR rtl-optimization/48596 ([SH] unable to find a register to spill in class 'FPUL_...
[gcc.git] / gcc / testsuite / gcc.c-torture / compile / pr48596.c
1 /* PR target/48596 */
2 enum { nrrdCenterUnknown, nrrdCenterNode, nrrdCenterCell, nrrdCenterLast };
3 typedef struct { int size; int center; } NrrdAxis;
4 typedef struct { int dim; NrrdAxis axis[10]; } Nrrd;
5 typedef struct { } NrrdKernel;
6 typedef struct { const NrrdKernel *kernel[10]; int samples[10]; } Info;
7
8 void
9 foo (Nrrd *nout, Nrrd *nin, const NrrdKernel *kernel, const double *parm,
10 const int *samples, const double *scalings)
11 {
12 Info *info;
13 int d, p, np, center;
14 for (d=0; d<nin->dim; d++)
15 {
16 info->kernel[d] = kernel;
17 if (samples)
18 info->samples[d] = samples[d];
19 else
20 {
21 center = _nrrdCenter(nin->axis[d].center);
22 if (nrrdCenterCell == center)
23 info->samples[d] = nin->axis[d].size*scalings[d];
24 else
25 info->samples[d] = (nin->axis[d].size - 1)*scalings[d] + 1;
26 }
27 }
28 }