[Bug lto/83201] [7/8 Regression] SPEC CPU2017 505.mcf_r produces incorrect output when built with -flto and FDO

brlcad at mac dot com gcc-bugzilla@gcc.gnu.org
Wed Mar 2 10:25:24 GMT 2022


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

--- Comment #25 from Sean <brlcad at mac dot com> ---
Ah, that makes sense, thank you Richard.  I didn't pay as close attention to
the actual swap() code and casting going on there.

Apparently unrelated, but perhaps worth noting the reason this come up on my
radar is because the latest compilers now also issue a warning on the
subtraction:

error: performing pointer subtraction with a null pointer has undefined
behavior [-Werror,-Wnull-pointer-subtraction]


More information about the Gcc-bugs mailing list