From patchwork Thu Oct 31 01:42:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam James X-Patchwork-Id: 99858 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5561A3857829 for ; Thu, 31 Oct 2024 01:43:47 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 0E6733857810 for ; Thu, 31 Oct 2024 01:43:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0E6733857810 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0E6733857810 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730338988; cv=none; b=pye7DC5n3QMDahH8UtVK+U4ECa38Id5TVyrTNKTPjFwwbmid7W4DAMPdfkZtZJWTBfk39g0CfXycGAwthDj5XH2Ty6dp1hJmvSpb9xEAlf/oQvJxDDwLU7HXKp7OGqhPr5CWHtV4M3EWU9xN9/bi213M00IZ74vo/829u+mcNWg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730338988; c=relaxed/simple; bh=Ga/Un/Ftynmp0bBMLOE2iaIajVzwMLH/AWUn3e5Xmig=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Filk19NRKX94mWJ7BJAj30iw/MIrBnsOc9WiDLjSV3m7gWHrPnvjz6SAmTV6Ql25XdXStKtwc2dULXCpCpwcfMxcxZyEkBuKzmYuUyt3Y5F4K+3Hzn6ZYAnvX+QW3agLMRKSoBL1zkCCUEsi55XVREJUDJj4OELsf7UwkosQg7A= ARC-Authentication-Results: i=1; server2.sourceware.org From: Sam James To: gcc-patches@gcc.gnu.org Cc: Sam James Subject: [committed] testsuite: fix syntax in Wstringop-overflow-59.c Date: Thu, 31 Oct 2024 01:42:46 +0000 Message-ID: <2dcb174385fd366282bf34bf95adbf918d5befda.1730338966.git.sam@gentoo.org> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org Fix quoting issues, escaping, and dg directive types. There were two issues here: 1) The incorrect quoting in an earlier dg-message was covering up that the syntax in the next part was wrong; 2) Fix dg-warning -> dg-message to correctly pick up the notes. Once 1) was fixed, this was exposed. With this, I get: ``` +PASS: gcc.dg/Wstringop-overflow-59.c note (test for warnings, line 192) +PASS: gcc.dg/Wstringop-overflow-59.c note (test for warnings, line 193) ``` gcc/testsuite/ChangeLog: PR middle-end/92936 * gcc.dg/Wstringop-overflow-59.c: Fix dg-* syntax. --- Pushed as obvious. gcc/testsuite/gcc.dg/Wstringop-overflow-59.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-59.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-59.c index b6265e37c865..88aac3a3678a 100644 --- a/gcc/testsuite/gcc.dg/Wstringop-overflow-59.c +++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-59.c @@ -172,8 +172,8 @@ void memset_malloc_2_same_size (int i) if (i < 1) i = 1; - char a4_1[4]; // { dg-message "at offset \\\[1, 4] into destination object 'a4_1" "note" } - char a4_2[4]; // { dg-message "at offset \\\[1, 4] into destination object 'a4_2" "note" } + char a4_1[4]; // { dg-message "at offset \\\[1, 4] into destination object 'a4_1'" "note" } + char a4_2[4]; // { dg-message "at offset \\\[1, 4] into destination object 'a4_2'" "note" } char *p4 = cond1 ? a4_1 : a4_2; char *p4_i = p4 + i; @@ -189,8 +189,8 @@ void memset_malloc_2_off (void) int i2 = SR (2, INT_MAX); { - char a5[5]; // { dg-warning "at offset [1, 5] into destination object 'a5' - char a7[7]; // { dg-warning "at offset [2, 7] into destination object 'a7' + char a5[5]; // { dg-message "at offset \\\[1, 5] into destination object 'a5'" "note" } + char a7[7]; // { dg-message "at offset \\\[2, 7] into destination object 'a7'" "note" } char *p5_p1 = a5 + i1; char *p7_p2 = a7 + i2; char *p5_7 = cond1 ? p5_p1 : p7_p2;