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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|patch                       |
                URL|https://gcc.gnu.org/piperma |
                   |il/gcc-patches/2023-Septemb |
                   |er/629171.html              |

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So with my new patch now (since the variable sharing issue is fixed), I am
running into:
+FAIL: gcc.dg/Wrestrict-22.c  (test for warnings, line 8)

r11-4135-ge864d395b4e862 added the testcase:
```
/* { dg-options "-O2 -Wrestrict" } */

void test_memcpy_warn (char *d, unsigned n)
{
  for (unsigned i = n; i < 30; ++i)
    if (i > 10)
      __builtin_memcpy (d, d + 2, i); /* { dg-warning "overlaps" } */
}

```

So we started to pull out of the loop `d+2` and (with my patch rewriting it
since it is a conditional) since r16-190-g6901d56fea2132 .

This is why I didn't see it before even. I wonder if the compute_invariantness
change should take into account conditional expressions ...

Reply via email to