https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57612
felix <felix.von.s at posteo dot de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |felix.von.s at posteo dot de --- Comment #3 from felix <felix.von.s at posteo dot de> --- Overlaps bug 6906. Under that ticket, I proposed adding a built-in that simply returns whether or not a given expression has side effects, simply by exposing TREE_SIDE_EFFECTS(). This more general built-in could also (partially) address bug 79469, by allowing to define __builtin_assume as #define __builtin_assume(cond) do { \ if (__builtin_pure_p(cond)) \ if (!(cond)) \ __builtin_unreachable(); \ } while (0) Partially, because e.g. if A has side effects, then with the definition above __builtin_assume(A && B) would consider the whole condition to have side effects as well, and therefore disregard it, even if B could potentially be mined for optimisation opportunities.