1 /* { dg-do compile } */
2 /* { dg-skip-if "" { *-*-* } { "-O0" "-fno-fat-lto-objects" } { "" } } */
3 /* At -O1 DOM threads a jump in a non-optimal way which leads to
4    the bogus propagation.  */
5 /* { dg-skip-if "" { *-*-* } { "-O1" } { "" } } */
6 /* { dg-options "-fdump-tree-ivcanon-details" } */
7 
8 int a[199];
9 
10 extern void abort (void);
11 
12 int
main()13 main ()
14 {
15   int i, x;
16   for (i = 0; i < 199; i++)
17     {
18       x = a[i];
19       if (x != i)
20 	abort ();
21     }
22   return 0;
23 }
24 
25 /* Verify that we do not propagate the equivalence x == i into the
26    induction variable increment.  */
27 
28 /* { dg-final { scan-tree-dump "Added canonical iv" "ivcanon" } } */
29