1 #include "analyzer-decls.h" 2 test(int n)3void test(int n) 4 { 5 int i; 6 7 __analyzer_dump_exploded_nodes (0); /* { dg-warning "1 processed enode" } */ 8 9 for (i = 0; i < n; i++) { 10 __analyzer_eval (i < n); /* { dg-warning "TRUE" } */ 11 /* (should report TRUE twice). */ 12 13 __analyzer_eval (i == 0); /* { dg-warning "TRUE" "1st" } */ 14 /* { dg-warning "FALSE" "2nd" { xfail *-*-* } .-1 } */ 15 /* { dg-warning "UNKNOWN" "status quo" { target *-*-* } .-2 } */ 16 /* TODO(xfail^^^): ideally we ought to figure out i > 0 after 1st iteration. */ 17 18 __analyzer_eval (i >= 0); /* { dg-warning "TRUE" } */ 19 20 __analyzer_dump_exploded_nodes (0); /* { dg-warning "2 processed enodes" } */ 21 } 22 23 __analyzer_eval (i >= n); /* { dg-warning "TRUE" "true" { xfail *-*-* } } */ 24 /* { dg-bogus "UNKNOWN" "unknown" { xfail *-*-* } .-1 } */ 25 26 __analyzer_eval (i == n); /* { dg-warning "TRUE" "true" { xfail *-*-* } } */ 27 /* { dg-bogus "UNKNOWN" "unknown" { xfail *-*-* } .-1 } */ 28 /* TODO(xfail^^^): it only figures out i >= 256, rather than i == 256. */ 29 30 __analyzer_dump_exploded_nodes (0); /* { dg-warning "1 processed enode" } */ 31 } 32