https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80386
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Status|UNCONFIRMED |NEW Last reconfirmed| |2017-04-11 CC| |mpolacek at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- .original w/o sanitizing has the expression dropped, with sanitizing we see <<cleanup_point <<< Unknown tree: expr_stmt (void) (NON_LVALUE_EXPR <SAVE_EXPR <-2147480728(OVF) - (int) (short int) member_1_3>>) >>>>>; slightly adjusting the testcase to return the expr shows w/o sanitizing return <retval> = (2921 - (int) (short int) member_1_3) + 2147483647; and with: <<cleanup_point return <retval> = NON_LVALUE_EXPR <SAVE_EXPR <-2147480728(OVF) - (int) (short int) member_1_3>>>>; clearly something is wrong here just with sanitizing (some of the TREE_OVERFLOW_SANITIZED checks supposedly, those are IMHO quite bogus anyway).