[Bug tree-optimization/98117] [8/9/10/11 Regression] wrong code with "-O3 -fno-tree-scev-cprop" since r8-1163-g7078979b291419f3

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Dec 7 08:39:36 GMT 2020


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Simplified testcase, fails with -O3 -fno-tree-scev-cprop

unsigned char c;
void __attribute__((noipa))
e()
{
  do
    {
    }
  while (++c);
}
int main()
{
  e();
  if (c != 0)
    __builtin_abort ();
  return 0;
}


It's the first new set_range_info that causes the miscompile.


More information about the Gcc-bugs mailing list