https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99212

--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Failing test is in test_45 at:
  __analyzer_eval (bits.b0 == 1); /* { dg-warning "TRUE" "desired" { xfail
*-*-* } } */
  /* { dg-warning "UNKNOWN" "status quo" { target *-*-* } .-1 } */


x86_64-pc-linux-gnu has:
  bits.b0 = 1;
  _1 = BIT_FIELD_REF <bits, 8, 0>;
  _2 = _1 & 1;
  _3 = _2 != 0;
  _4 = (int) _3;
  __analyzer_eval (_4);
  bits.b0 = 1;
  _1 = BIT_FIELD_REF <bits, 8, 0>;
  _2 = _1 & 1;
  _3 = _2 != 0;
  _4 = (int) _3;
  __analyzer_eval (_4);

whereas cris-axis-elf has:
  bits.b0 = 1;
  _1 = VIEW_CONVERT_EXPR<unsigned char>(bits);
  _2 = _1 & 1;
  _3 = _2 != 0;
  _4 = (int) _3;
  __analyzer_eval (_4);
  bits.b456 = 5;
  _5 = VIEW_CONVERT_EXPR<unsigned char>(bits);
  _6 = _5 & 112;
  _7 = _6 == 80;
  _8 = (int) _7;
  __analyzer_eval (_8);

BIT_FIELD_REF doesn't work (hence the "UNKNOWN" in the expected output),
whereas the first VIEW_CONVERT_EXPR does work, unexpectedly emitting "TRUE",
hence the XPASS (and the FAIL on the "UNKNOWN" directive, which is there to
swallow the "UNKNOWN" output)

Reply via email to