1 /* PR rtl-optimization/24899 */
2 
3 extern void abort (void);
4 
5 __attribute__ ((noinline)) int
foo(int x,int y,int * z)6 foo (int x, int y, int *z)
7 {
8   int a, b, c, d;
9 
10   a = b = 0;
11   for (d = 0; d < y; d++)
12     {
13       if (z)
14 	b = d * *z;
15       for (c = 0; c < x; c++)
16 	a += b;
17     }
18 
19   return a;
20 }
21 
22 int
main(void)23 main (void)
24 {
25   if (foo (3, 2, 0) != 0)
26     abort ();
27   return 0;
28 }
29