https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106654
--- Comment #9 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- (In reply to Jason Merrill from comment #8) > (In reply to Aldy Hernandez from comment #7) > > Silly question, why can't you expand the [[assume]] construct into: > > > > if (x > 5) > > __builtin_unreachable (); > > > > ...like we always have. Then no changes are needed to ranger :). Or does > > this have to do with the whole side-effect thing? > > Exactly. For expressions with no side-effects, we can do that. For, say, a > call to a non-const function, we need to avoid actually emitting the call. So...could we keep doing what we're doing for non side-effect code, and only do the outline function for side-effect stuff? Or is that too much to ask? But wait a minute, is calling a non-const function from [[assume]] even allowed?