------- Comment #6 from tobi at gcc dot gnu dot org 2007-03-21 15:04 ------- I don't understand why it fails in the fourth case. The comparison it seems to complain about is generated via return build2 (NE_EXPR, boolean_type_node, decl, fold_convert (TREE_TYPE (decl), null_pointer_node)); (trans-expr.c:141) which looks like it gets the types right. Replacing the call to fold_convert with an equivalent call to build_int_cst doesn't help either, BTW.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28722