PR tree-optimization/85826 - ICE in gimple-ssa-warn-restruct on
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr19590.c
blob2c6cfc6f831a46e19ffa000d626c8d7ffd69d94e
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-ivopts" } */
4 void vnum_test8(int *data)
5 {
6 int i;
7 int stop = data[3];
8 int m = data[4];
9 int n = m;
10 for (i=1; i<stop; i++) {
11 int k = data[2];
12 data[k] = 2;
13 data[0] = m - n;
14 k = data[1];
15 m = m + k;
16 n = n + k;
20 /* Using the SCEV analysis, this loop should be transformed to:
22 | void vnum_result8(int *data)
23 |{
24 | int i;
25 | int stop = data[3];
26 | for (i=1; i<stop; i++) {
27 | int k = data[2];
28 | data[k] = 2;
29 | data[0] = 0;
30 | }
35 /* { dg-final { scan-tree-dump-times "= 0;" 1 "ivopts"} } */
36 /* { dg-final { scan-tree-dump-times "= 2;" 1 "ivopts"} } */