https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118742
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2025-02-04 Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Smaller testcase: _Bool __GIMPLE (ssa,startwith("optimized")) g1(int i) { _Bool _1; _Bool _2; __BB(2,guessed_local(97603132)): _1 = i_3(D) == 1; _2 = ~_1; return _2; } the issue is that we do case CPP_COMPL: c_parser_consume_token (parser); op = c_parser_gimple_postfix_expression (parser); return parser_build_unary_op (op_loc, BIT_NOT_EXPR, op); and parser_build_unary_op wraps op. We're defering to the C parser GENERIC building to emit diagnostics, maybe that's a bad choice here. This function wraps build_unary_op which has a 'noconvert' argument which should be set for all invocations from the GIMPLE FE, we can either pass in an additional arg, somehow extract from state that we're parsing a GIMPLE function or provide our own wrapper around build_unary_op.