https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118074

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Weibo He from comment #3)
> Intert a printf into final_suspend helps clang and GCC 10 ~ 14 give expected
> result. While GCC trunk not work. 
> Is it a GCC 15 regression?

It does not help -O0 gcc nor -O0 clang, both still give runtime errors with
-fsanitize=address .  clang -O2 does not give a runtime error with
-fsanitize=address but I can only assume it is able to optimize away the load
after the delete .

So I tried MSVC with /fsanitize=address but the dll is not installed on godbolt
so I have no way to fully test it.

Reply via email to