https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119717
--- Comment #3 from qinzhao at gcc dot gnu.org --- (In reply to uecker from comment #2) > I guess you need to use c_fully_fold Yes. thanks for the hints. in c_fully_fold, it assumes: /* Operands of variable-length expressions (function calls) have already been folded, as have __builtin_* function calls, and such expressions cannot occur in constant expressions. */ if (kind == tcc_vl_exp) { *maybe_const_operands = false; ret = fold (expr); goto out; } Therefore, when build call to .ACCESS_WITH_SIZE, we should fully_fold its operands before building the call.