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