[Bug c/100789] [9/10/11/12 Regression] ICE with __transaction_relaxed and left shit signed overflow

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 29 18:04:04 GMT 2022


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

--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
The problem is that we're creating a C_MAYBE_CONST_EXPR inside of a
TRANSATION_EXPR, but c_fully_fold doesn't walk into TRANSATION_EXPRs, so the
C_MAYBE_CONST_EXPR leaks into the gimplifier.

__transaction_relaxed
{
  <<< Unknown tree: c_maybe_const_expr

    8526495038820057088 >>>
}

I don't know if it's OK to fold the insides of a TRANSATION_EXPR.  Another
option would to avoid creating C_MAYBE_CONST_EXPRs inside a transaction expr,
like in_late_binary_op?


More information about the Gcc-bugs mailing list