* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / pr42956.c
blobce03a8ff47e8bc3b898d351075757b352a27ed43
1 /* { dg-require-effective-target alloca } */
2 typedef const int cint;
3 typedef struct {
4 } Bounds;
5 int ndim_, ncomp_, selectedcomp_, nregions_;
6 void *voidregion_;
7 typedef struct {
8 double diff, err, spread;
9 } Errors;
10 typedef const Errors cErrors;
11 void Split(int iregion, int depth, int xregion)
13 typedef struct {
14 double avg, err, spread, chisq;
15 double xmin[ndim_], xmax[ndim_];
16 } Result;
17 typedef struct region {
18 Result result[ncomp_];
19 } Region;
20 Errors errors[ncomp_];
21 int comp, ireg, xreg;
22 for( ireg = iregion, xreg = xregion; ireg < nregions_; ireg = xreg++ )
24 Result *result = ((Region *)voidregion_)[ireg].result;
25 for( comp = 0; comp < ncomp_; ++comp )
27 Result *r = &result[comp];
28 cErrors *e = &errors[comp];
29 double c = e->diff;
30 if( r->err > 0 ) r->err = r->err*e->err + c;