On Mon, 8 Sept 2025 at 13:54, Richard Biener <richard.guent...@gmail.com> wrote:
> That said, I see no point in std::observable_checkpoint to be represented
> in the IL at all if all it is is to cater to FUD around what compilers might
> think is a correct transform?

It's not just to cater to FUD. I have seen Clang remove a complete CFG
edge that lead to a non-return from
a non-void function. If observable_checkpoint works correctly, the
debug prints my junior colleague added trying
to see how the execution flows would've worked when used with the
checkpoint, whereas clang happily
removed them along with everything else on that CFG edge proven to
lead to UB. I am unable to find
any specification rationale that would make such a transformation
incorrect, and with observable_checkpoint,
that situation changes.

Reply via email to