https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116775
--- Comment #14 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #13) > For assume, note the r15-9124-ga6c2248cfd4bc change, just throwing away the > expression doesn't work well when combining with computed gotos, it is > invalid but we don't want to ICE. > On the other side, assume is just an optimization, the compiler is always > free to ignore any assumptions discovered from it, so I think changing the > assume stuff from > [[assume (exp)]] to [[assume (1 || exp)]] if exp contains co_* and then > lowering it might work, assuming coro works fine for 1 || exp. > The rest was just from skimming through extend.texi, haven't actually looked > at what IL we get at coro lowering time (just that it might be a good idea > to have some testcase). Yeah, I guess the issue with eliding the expression completely is: http://eel.is/c++draft/dcl.attr.assume#2 which means that even though it is not evaluated the content is ODR-used.