Closed
Description
This code:
https://godbolt.org/z/xxoY4zhTG
is miscompiled by clang, a register is not reloaded in the catch-funclet so 'this' becomes garbage inside the catch. I'm using 15.0.7 and I have tried different versions on godbolt. Starting with 8.0.0 they give essentially the same code. (Versions before this give correct code, but that may just be a fluke, this bug was hard to reproduce...)
Karl-Johan Johnsson