annotate gcc/testsuite/gcc.c-torture/compile/920723-1.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-add-options stack_size } */
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 #if defined(STACK_SIZE) && STACK_SIZE < 65536
kono
parents:
diff changeset
4 # define GITT_SIZE 75
kono
parents:
diff changeset
5 #endif
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 #ifndef GITT_SIZE
kono
parents:
diff changeset
8 # define GITT_SIZE 150
kono
parents:
diff changeset
9 #endif
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 typedef struct {
kono
parents:
diff changeset
12 double x, y;
kono
parents:
diff changeset
13 } vector_t;
kono
parents:
diff changeset
14 double sqrt();
kono
parents:
diff changeset
15 f(int count,vector_t*pos,double r,double *rho)
kono
parents:
diff changeset
16 {
kono
parents:
diff changeset
17 int i, j, miny, maxy, hy;
kono
parents:
diff changeset
18 float help, d;
kono
parents:
diff changeset
19 int gitt[GITT_SIZE][GITT_SIZE];
kono
parents:
diff changeset
20 int *data = (int *)malloc(count*sizeof(int));
kono
parents:
diff changeset
21 for (i = 0; i < count; i++)
kono
parents:
diff changeset
22 rho[i] = 0;
kono
parents:
diff changeset
23 for (i = 1; i < count; i++)
kono
parents:
diff changeset
24 for (hy = miny; hy<= maxy; hy++)
kono
parents:
diff changeset
25 while(j >=0) {
kono
parents:
diff changeset
26 d = pos[i].y - pos[j].y;
kono
parents:
diff changeset
27 if ( d <= r) {
kono
parents:
diff changeset
28 d = sqrt(d);
kono
parents:
diff changeset
29 rho[i] += help;
kono
parents:
diff changeset
30 }
kono
parents:
diff changeset
31 }
kono
parents:
diff changeset
32 }
kono
parents:
diff changeset
33