]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/testsuite/gcc.dg/pr20126.c
Reset PHI base0 flag if it's clear in any argument [PR101977, ...]
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / pr20126.c
index a421ce1758ddd265793784511dd809e873c0e8b4..10aeec74f396090be3472a5d52a9bd3a99162db7 100644 (file)
@@ -34,6 +34,10 @@ foo (S *x, S *y)
   while (e <= g)
     {
       const char *t = e + 1;
+      /* The pointer E below increases but the bound H stays constant,
+        letting the latter exceed the size remaining in the argument
+        pointed to by the formed, which might be detected by
+        -Wstringop-overread.  */
       if (__builtin_memcmp (e, f, h) == 0)
         return 1;
       e = t;
@@ -48,3 +52,5 @@ main (void)
     abort ();
   return 0;
 }
+
+/* { dg-prune-output "-Wstringop-overread" } */