/* { dg-do compile } */ /* { dg-options "-O1 -fscalar-evolutions -ftree-elim-checks -fdump-tree-scev-details -fdump-tree-elck-details -fdump-tree-optimized" } */ void remove_me (void); int main(void) { int a; int b = 22; /* loop_1 runs exactly 28 times. */ for (a = 22; a < 50; a++) /* a -> {22, +, 1}_1 */ { if (a > b) /* This condition is always false. */ remove_me (); b = b + 2; /* b -> {22, +, 2}_1 */ } } /* { dg-final { scan-tree-dump-times "nb_iterations 28" 1 "scev"} } */ /* { dg-final { scan-tree-dump-times "remove_me" 0 "optimized"} } */