From: Martin Sebor Date: Wed, 19 Jan 2022 00:53:20 +0000 (-0700) Subject: Suppress valid warning [PR104103]. X-Git-Tag: upstream/12.2.0~1984 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=282110ae8b54250c8dcb73afc6f30761a41e38e6;p=platform%2Fupstream%2Fgcc.git Suppress valid warning [PR104103]. gcc/testsuite/ChangeLog: PR middle-end/104103 * gcc.dg/torture/pr57147-2.c: Prune out expected warning. --- diff --git a/gcc/testsuite/gcc.dg/torture/pr57147-2.c b/gcc/testsuite/gcc.dg/torture/pr57147-2.c index 036a6d0..9952e3b 100644 --- a/gcc/testsuite/gcc.dg/torture/pr57147-2.c +++ b/gcc/testsuite/gcc.dg/torture/pr57147-2.c @@ -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" } } */