Add malloc predictor (PR middle-end/83023).
[official-gcc.git] / gcc / testsuite / gcc.dg / pr46387.c
blobe06bd3b106581927ec4c7eb69b060c45d82a6bcf
1 /* PR debug/46387 */
2 /* { dg-do compile } */
3 /* { dg-options "-g -O2" } */
5 struct S { double x; double y; short z; };
6 int a = 0, b = 0, c;
7 void bar (int, int, int);
8 void baz (int *, int *, int *);
10 void
11 foo (struct S *v)
13 int x, y, z;
14 if (!a && b != 0)
15 return;
16 if (v->z)
17 baz (&x, &y, &z);
18 else
20 x = v->x;
21 y = v->y;
23 x = x / (5 + 1);
24 y = y / (5 + 1);
25 if (x < 0)
26 x = 0;
27 if (x > c - 1)
28 x = c - 1;
29 if (b == 0)
30 bar (x, y, 1);
31 return;