modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/compile/pr42956.c (about) 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) 12 { 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++ ) 23 { 24 Result *result = ((Region *)voidregion_)[ireg].result; 25 for( comp = 0; comp < ncomp_; ++comp ) 26 { 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; 31 } 32 } 33 } 34