]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/testsuite/gcc.dg/Wstringop-overflow-47.c
Correct handling of variable offset minus constant in -Warray-bounds [PR100137]
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / Wstringop-overflow-47.c
index 9bfc84af5697f4a4ee0e7609dab66841a49fb445..6412874e2f958859f9459c67ad4558bb54de3dcf 100644 (file)
@@ -24,22 +24,22 @@ void nowarn_c32 (char c)
   sink (p);
 }
 
-/* The tests below fail as a result of the hack for PR 96963.  However,
-   with -Wall, the invalid stores are diagnosed by -Warray-bounds which
-   runs before vectorization and so doesn't need the hack.  If/when
-   -Warray changes to use compute_objsize() this will need adjusting.  */
+/* The tests below failed as a result of the hack for PR 96963.  However,
+   with -Wall, the invalid stores were diagnosed by -Warray-bounds which
+   runs before vectorization and so doesn't need the hack.  Now that
+   -Warray-bounds has changed to use compute_objsize() the tests pass.  */
 
 void warn_c32 (char c)
 {
-  extern char warn_a32[32];   // { dg-message "at offset 32 into destination object 'warn_a32' of size 32" "pr97027" { xfail *-*-* } }
+  extern char warn_a32[32];   // { dg-message "at offset 32 into destination object 'warn_a32' of size 32" "pr97027" }
 
   void *p = warn_a32 + 1;
-  *(C32*)p = (C32){ c };      // { dg-warning "writing 1 byte into a region of size 0" "pr97027" { xfail *-*-* } }
+  *(C32*)p = (C32){ c };      // { dg-warning "writing 1 byte into a region of size 0" "pr97027" }
 
   /* Verify a local variable too. */
   char a32[32];
   p = a32 + 1;
-  *(C32*)p = (C32){ c };      // { dg-warning "writing 1 byte into a region of size 0" "pr97027" { xfail *-*-* } }
+  *(C32*)p = (C32){ c };      // { dg-warning "writing 1 byte into a region of size 0" "pr97027" }
   sink (p);
 }