OSDN Git Service

PR testsuite/23239
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-prof / val-prof-5.c
1 /* { dg-options "-O2 -fdump-tree-optimized -fdump-tree-tree_profile" } */
2 int a[1000];
3 int b=997;
4 main()
5 {
6         int i;
7         for (i = 0; i < 1000; i++)
8                 if (a[i])
9                         a[i]/=b;
10                 else
11                         a[i]/=b;
12         return 0;
13 }
14 /* { dg-final-use { scan-tree-dump "Div.mod by constant b.*=997 transformation on insn" "tree_profile"} } */
15 /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */
16 /* { dg-final-use { cleanup-tree-dump "optimized" } } */
17 /* { dg-final-use { cleanup-tree-dump "tree_profile" } } */