1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-ivopts-details" } */
3 
4 long last_data_offset;
5 int store;
6 char *data;
7 void g (long);
8 
9 void
f()10 f ()
11 {
12 
13   long data_offset = last_data_offset;
14   char *p;
15 
16   for (p = data; *p; p++)
17     {
18       data_offset++;
19       g (data_offset);
20       store = data_offset + 1;
21     }
22 }
23 
24 /* We should only have two IVs.  */
25 /* { dg-final { scan-tree-dump-not "\\n  candidates \\d+, \\d+,\[^\\n\]*\\n\[^\\n\]*\\nFinal cost" "ivopts" } }  */
26