Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.c-torture / execute / 20000605-1.c
blobb481ecb62b6731d179a7157550789bb933534460
1 typedef struct _RenderInfo RenderInfo;
2 struct _RenderInfo
4 int y;
5 float scaley;
6 int src_y;
7 };
9 static void bar(void) { }
11 static int
12 render_image_rgb_a (RenderInfo * info)
14 int y, ye;
15 float error;
16 float step;
18 y = info->y;
19 ye = 256;
21 step = 1.0 / info->scaley;
23 error = y * step;
24 error -= ((int) error) - step;
26 for (; y < ye; y++) {
27 if (error >= 1.0) {
28 info->src_y += (int) error;
29 error -= (int) error;
30 bar();
32 error += step;
34 return info->src_y;
37 int main (void)
39 RenderInfo info;
41 info.y = 0;
42 info.src_y = 0;
43 info.scaley = 1.0;
45 if (render_image_rgb_a(&info) != 256)
46 abort ();
47 exit(0);