1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-ivcanon-details" } */
3 
foo2(unsigned int num,int * a)4 void foo2 (unsigned int num, int *a)
5 {
6   unsigned int i, n = (num - (num % 2));
7 
8   for(i = 0; i != n; i += 2)
9     a[i] = 0;
10 }
11 
foo3(unsigned int num,int * a)12 void foo3 (unsigned int num, int *a)
13 {
14   unsigned int i, n = (num - (num % 3));
15 
16   for(i = 0; i != n; i += 3)
17     a[i] = 0;
18 }
19 
foo4(unsigned int num,int * a)20 void foo4 (unsigned int num, int *a)
21 {
22   unsigned int i, n = (num - (num % 4));
23 
24   for(i = 0; i != n; i += 4)
25     a[i] = 0;
26 }
27 
foo5(unsigned int num,int * a)28 void foo5 (unsigned int num, int *a)
29 {
30   unsigned int i, n = (num - (num % 5));
31 
32   for(i = 0; i != n; i += 5)
33     a[i] = 0;
34 }
35 
36 /* { dg-final { scan-tree-dump-not "under assumptions " "ivcanon" } } */
37