modernc.org/cc@v1.0.1/testdata/gcc-6.3.0/gcc/testsuite/gcc.c-torture/compile/920723-1.c (about)

     1  
     2  #if defined(STACK_SIZE) && STACK_SIZE < 65536
     3  # define GITT_SIZE 75
     4  #endif
     5  
     6  #ifndef GITT_SIZE
     7  # define GITT_SIZE 150
     8  #endif
     9  
    10  typedef struct {
    11    double x, y;
    12  } vector_t;
    13  double sqrt();
    14  f(int count,vector_t*pos,double r,double *rho)
    15  {
    16    int i, j, miny, maxy, hy;
    17    float help, d;
    18    int gitt[GITT_SIZE][GITT_SIZE];
    19    int *data = (int *)malloc(count*sizeof(int));
    20    for (i = 0; i < count; i++)
    21      rho[i] = 0;
    22    for (i = 1; i < count; i++)
    23      for (hy = miny; hy<= maxy; hy++)
    24        while(j >=0) {
    25  	d = pos[i].y - pos[j].y;
    26  	if ( d <= r) {
    27  	  d = sqrt(d);
    28  	  rho[i] += help;
    29  	}
    30        }
    31  }
    32