Suppress valid warning [PR104103].
authorMartin Sebor <msebor@redhat.com>
Wed, 19 Jan 2022 00:53:20 +0000 (17:53 -0700)
committerMartin Sebor <msebor@redhat.com>
Wed, 19 Jan 2022 01:04:08 +0000 (18:04 -0700)
gcc/testsuite/ChangeLog:
PR middle-end/104103
* gcc.dg/torture/pr57147-2.c: Prune out expected warning.

gcc/testsuite/gcc.dg/torture/pr57147-2.c

index 036a6d0..9952e3b 100644 (file)
@@ -17,7 +17,13 @@ static void SetNaClSwitchExpectations (void)
 void TestSyscall(void)
 {
   SetNaClSwitchExpectations();
+
   _setjmp (g_return_jmp_buf);
 }
 
+/* sizeof g_return_jmp_buf is zero size but it's being passed to
+   a function declared to take an array of one element which might
+   trigger a warning.  Prune it out:
+   { dg-prune-output "-Wstringop-overflow" } */
+
 /* { dg-final { scan-tree-dump-not "setjmp" "optimized" } } */