https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98681
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Adjusted testcase (-O2):
__attribute__((noipa)) int
foo (int x)
{
if (x > 32)
return (x << -64) & 255;
else
return x;
}
int
main ()
{
if (foo (32) != 32 || foo (-150) != -150)
__builtin_abort ();
return 0;
}
This doesn't invoke UB.