Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/921113-1.c

raw
1 /* { dg-require-stack-size "128 * 128 * 4 + 1024" } */
2
3 void abort (void);
4 void exit (int);
5
6 typedef struct {
7 float wsx;
8 } struct_list;
9
10 typedef struct_list *list_t;
11
12 typedef struct {
13 float x, y;
14 } vector_t;
15
16 void w(float x, float y) {}
17
18 void
19 f1(float x, float y)
20 {
21 if (x != 0 || y != 0)
22 abort();
23 }
24 void
25 f2(float x, float y)
26 {
27 if (x != 1 || y != 1)
28 abort();
29 }
30
31 void
32 gitter(int count, vector_t pos[], list_t list, int *nww, vector_t limit[2], float r)
33 {
34 float d;
35 int gitt[128][128];
36
37 f1(limit[0].x, limit[0].y);
38 f2(limit[1].x, limit[1].y);
39
40 *nww = 0;
41
42 d = pos[0].x;
43 if (d <= 0.)
44 {
45 w(d, r);
46 if (d <= r * 0.5)
47 {
48 w(d, r);
49 list[0].wsx = 1;
50 }
51 }
52 }
53
54 vector_t pos[1] = {{0., 0.}};
55 vector_t limit[2] = {{0.,0.},{1.,1.}};
56
57 int
58 main(void)
59 {
60 int nww;
61 struct_list list;
62
63 gitter(1, pos, &list, &nww, limit, 1.);
64 exit(0);
65 }
66