https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120400
--- Comment #5 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Iain Sandoe from comment #4) > (In reply to Andrew Pinski from comment #3) > > that is TRUTH_ANDIF_EXPR being converted into TRUTH_AND_EXPR in fold because > > fold thinks coro_before_return and cond don't have side effects as they are > > normal decls at the point fold is called. > > hmm .. perhaps if a DECL has a D_V_E that should be blocked? > (one of the decls is "normal" coro_before_return ,,, bu the other is not - > it has a D_V_E pointing to the coroutine frame, and the folder probably > should not be reasoning about that). > > ? I must say it's also somewhat odd that the folder chooses the more expensive condition to come first - but then if there's no short-circuiting then all the ops will be done anyway.