IRA: Ignore debug insns for uses in split_live_ranges_for_shrink_wrap. [PR116179]
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / loop-n-down-to-1-by-1.c
blob1ab8abec8937720e42e432175f02ebae9eae6246
1 #include "../../gcc.dg/analyzer/analyzer-decls.h"
3 void test(int n)
5 int i;
7 __analyzer_dump_exploded_nodes (0); /* { dg-warning "1 processed enode" } */
9 for (i = n; i > 0; i--) {
10 __analyzer_eval (i > 0); /* { dg-warning "TRUE" "true" } */
11 /* { dg-bogus "UNKNOWN" "unknown" { xfail *-*-* } .-1 } */
12 /* TODO(xfail^^^): should report TRUE twice. */
14 __analyzer_eval (i == n); /* { dg-warning "TRUE" "1st" } */
15 /* { dg-warning "FALSE" "2nd" { xfail *-*-* } .-1 } */
16 /* { dg-warning "UNKNOWN" "status quo" { target *-*-* } .-2 } */
17 /* TODO(xfail^^^): ideally we ought to figure out i > 0 after 1st iteration. */
19 __analyzer_eval (i <= n); /* { dg-warning "TRUE" "1st" } */
20 /* { dg-warning "TRUE" "2nd" { xfail *-*-* } } */
21 /* { dg-warning "UNKNOWN" "status quo" { target *-*-* } .-2 } */
22 /* TODO(xfail^^^): ideally we ought to figure out i >= 0 for all iterations. */
24 __analyzer_dump_exploded_nodes (0); /* { dg-warning "2 processed enodes" } */
27 __analyzer_eval (i <= 0); /* { dg-warning "TRUE" "true" } */
30 __analyzer_eval (i == 0); /* { dg-warning "TRUE" "desired" { xfail *-*-* } } */
31 /* { dg-warning "UNKNOWN" "status quo" { target *-*-* } .-1 } */
32 /* TODO(xfail^^^): it only figures out i >= 256, rather than i == 256. */
34 __analyzer_dump_exploded_nodes (0); /* { dg-warning "1 processed enode" } */