https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93348
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- We end up with two nested C_MAYBE_CONST_EXPRs, where the outer one contains a NOP_EXPR of the inner one, and during c_fully_fold_internal this isn't optimized away: 461 op0 = c_fully_fold_internal (op0, in_init, maybe_const_operands, 462 maybe_const_itself, for_int_const, 463 op0_lval); 464 STRIP_TYPE_NOPS (op0); 465 466 if (for_int_const && TREE_CODE (op0) != INTEGER_CST) 467 goto out; FOR_INT_CONST indicates if EXPR is an expression with integer constant operands, and if any of the operands doesn't get folded to an integer constant, don't fold the expression itself. and is set because we were folding the argument of the outer C_MAYBE_CONST_EXPR. Joseph, can you please have a look?