Debian Codegraph @

gcc/testsuite/gcc.c-torture/compile/920723-1.c

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