OSDN Git Service

PR rtl-optimization/52139
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / ivopt_infer_2.c
1 /* { dg-do compile { target {{ i?86-*-* x86_64-*-* } && lp64 } } } */
2 /* { dg-options "-O2 -m64 -fdump-tree-ivopts-details" } */
3
4 #ifndef TYPE
5 #define TYPE char*
6 #endif
7
8 extern char a[];
9
10 /* Can not infer loop iteration from array -- exit test can not be replaced.  */
11 void foo (unsigned int i_width, TYPE dst)
12 {
13   unsigned long long i = 0;
14   unsigned long long j = 0;
15   for ( ; j < i_width; )
16     {
17       *dst = a[i];
18       dst++;
19       i += 2;
20       j += 1;
21     }
22 }
23
24 /* { dg-final { scan-tree-dump-times "Replacing" 0 "ivopts"} } */
25 /* { dg-final { cleanup-tree-dump "ivopts" } } */