As discussed on gcc@, integer_onep is supposed to return false for a nonzero 1-bit value if the type is signed.
Tested on x86_64-linux-gnu and powerpc64-linux-gnu. OK to install? Thanks, Richard Index: gcc/tree.c =================================================================== --- gcc/tree.c 2013-10-29 19:19:27.623468618 +0000 +++ gcc/tree.c 2013-11-02 17:25:06.499657501 +0000 @@ -2092,7 +2092,7 @@ integer_onep (const_tree expr) switch (TREE_CODE (expr)) { case INTEGER_CST: - return wi::eq_p (expr, 1); + return wi::eq_p (wi::to_widest (expr), 1); case COMPLEX_CST: return (integer_onep (TREE_REALPART (expr)) && integer_zerop (TREE_IMAGPART (expr)));