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

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think just folding the builtin to 0 right away might be easier.  Note, seems
__builtin_constant_p (0 && ++i) is actually folded to 1, and ditto for
__builtin_constant_p (({ 0 }) && ++i) so we are able to prove that the
side-effects won't actually happen at runtime.  But I think we just don't want
to fold the builtin with co_* in it to 0, users are trying something weird. 
Even if they actually write __builtin_constant_p (0 && co_await ...) and we
don't fold it away before coro lowering.

Reply via email to