PR testsuite/92016 - Excess errors in Wstringop-overflow-17.c
authorMartin Sebor <msebor@redhat.com>
Tue, 15 Oct 2019 19:16:51 +0000 (19:16 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Tue, 15 Oct 2019 19:16:51 +0000 (13:16 -0600)
gcc/testsuite/ChangeLog:
* gcc.dg/Wstringop-overflow-17.c: Expect an additional warning.

From-SVN: r277008

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wstringop-overflow-17.c

index d18f5b4..730e396 100644 (file)
@@ -1,3 +1,8 @@
+2019-10-15  Martin Sebor  <msebor@redhat.com>
+
+       PR testsuite/92016
+       * gcc.dg/Wstringop-overflow-17.c: Expect an additional warning.
+
 2019-10-15  Bill Schmidt  <wschmidt@linux.ibm.com>
 
        PR target/92093
index de22c98..fdacea3 100644 (file)
@@ -1,12 +1,11 @@
 /* Test to verify that -Wstringop-overflow mentions the referenced object
-   i.
    { dg-do compile }
    { dg-options "-O2 -Wall" } */
 
 static void copy_n (char *d, const char *s, int n)
 {
   while (n--)
-    *d++ = *s++;
+    *d++ = *s++;    // { dg-warning "writing 1 byte into a region of size 0" }
   *d = 0;           // { dg-warning "writing 1 byte into a region of size 0" }
 }