[Bug tree-optimization/93744] [8/9/10 Regression] Different results between gcc-9 and gcc-7
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Feb 14 21:53:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93744
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |tree-optimization
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Unfortunately, code inspection finds other problematic patterns, e.g. since my
r10-5256-g49647b7b25673273262fb630598027c6d841690f change:
int w;
int
foo (int x, int y, int z)
{
int r = z - ((z - w++) & -(x < y));
return r;
}
int
main ()
{
w = 4;
if (foo (5, 7, 12) != 4 || w != 5)
__builtin_abort ();
if (foo (7, 5, 12) != 12 || w != 6)
__builtin_abort ();
return 0;
}
or
int w;
int
foo (int x, int y, int z)
{
int r = z + ((w++ - z) & -(x < y));
return r;
}
int
main ()
{
w = 4;
if (foo (5, 7, 12) != 4 || w != 5)
__builtin_abort ();
if (foo (7, 5, 12) != 12 || w != 6)
__builtin_abort ();
return 0;
}
More information about the Gcc-bugs
mailing list