From patchwork Wed Mar 13 14:18:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Torbjorn SVENSSON X-Patchwork-Id: 1911735 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.a=rsa-sha256 header.s=selector1 header.b=y+qIqXUL; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Tvt3Z30v2z1yWy for ; Thu, 14 Mar 2024 01:21:12 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A8A1D3857BB0 for ; Wed, 13 Mar 2024 14:21:10 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by sourceware.org (Postfix) with ESMTPS id 827543858C3A for ; Wed, 13 Mar 2024 14:20:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 827543858C3A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=foss.st.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 827543858C3A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=185.132.182.106 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710339652; cv=none; b=S9UlBDAVh82D0aO2AD+Iu+n9rcPHMjSSUWevifbkMog+ODgzMcFpaNpM5p2WdxiTzueyK6M2JJEDk1gCwctFOKyc9VRAZtmG30wREFXmmQHnnB90bcvW1gVA/A/vjwskBaVYq6ypQTBQSPeKho6K9tgZB2oTSopikTfiW89lvJQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710339652; c=relaxed/simple; bh=Fzqql0ngTpKxMoVQmEy3R+m8g6gr6APjDVDVc0RaQaI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=d9g1rj+DEhJQCdHDEfTN+7ROTX4/Zm+/mCyyQL5lUI6Y/YLKVRnwwVSMWeBsPPu/5Ql6+k5ylKIDLul/6InCvuw80w/vDWjshs66ywDhY+RhPyvi4pggqboBY2AmzGrW/+aWciBRLbiPKxvIHT3Qe6j8+96eUjKFd7ktSzcw8bA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0369458.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42DEBXZQ014964; Wed, 13 Mar 2024 15:20:48 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s= selector1; bh=Z2ZTkzMBIRul9roX3jHERsxnmmD87h1ZxCHhHtho7R0=; b=y+ qIqXULnQjvfKeZa+v03u6FN+MLiS7wboq5/y3OVdwe+kIQJ0wfFHS4bDrbdw8HM2 U0R8ue8AHvkUsie+6xG5HDx9k8JnSW0vanpwnID46S/tF71gZU1+72GunpLzuUyL Zj+NVmpslLaeDGpIoEzVfxnjyhIDPv5fDX3mc7EDHZC0keyyBmHGAmBSdDJ1GDG7 za/DHXYtZvl+QjqCSluP+x/WADIQzskA/+8cJ8zbRkcv6H5ujJDxSLNLUq0MeUCW Qh6m/5sltl8iNSnnp5zVOK7c50Y3AdnHXSbdGvOWCO6N9FWAZqz8Wk6mD4PcdI0k 6IRaawsnAvnthtYGVsYQ== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3ws27507w6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Mar 2024 15:20:48 +0100 (CET) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id C22A940045; Wed, 13 Mar 2024 15:20:44 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 92FA32085C9; Wed, 13 Mar 2024 15:20:14 +0100 (CET) Received: from jkgcxl0004.jkg.st.com (10.74.22.255) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 13 Mar 2024 15:20:14 +0100 From: =?utf-8?q?Torbj=C3=B6rn_SVENSSON?= To: , CC: , , , , , , =?utf-8?q?Torbj=C3=B6rn_SVENSSON?= Subject: [comitted] testsuite: target test for short_enums Date: Wed, 13 Mar 2024 15:18:30 +0100 Message-ID: <20240313141829.737090-1-torbjorn.svensson@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <31b71e82-4fcd-4dc7-bf5b-ceb6200e9094@redhat.com> References: <31b71e82-4fcd-4dc7-bf5b-ceb6200e9094@redhat.com> MIME-Version: 1.0 X-Originating-IP: [10.74.22.255] X-ClientProxiedBy: SHFCAS1NODE1.st.com (10.75.129.72) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-13_09,2024-03-12_01,2023-05-22_02 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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+incoming=patchwork.ozlabs.org@gcc.gnu.org Committed the blow as requested by Jason in the patch for releases/gcc-13. --- On arm-none-eabi, the test case fails with below warning on GCC13 .../null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c:63:65: warning: converting a packed 'enum obj_type' pointer (alignment 1) to a 'struct connection' pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member] Add a dg-bogus to ensure that the warning is not reintroduced. gcc/testsuite/ChangeLog: * c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c: Added dg-bogus with target on offending line for short_enums. Signed-off-by: Torbjörn SVENSSON --- .../null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c index c1c8e6f6a39..a37962f1d85 100644 --- a/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c +++ b/gcc/testsuite/c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c @@ -61,7 +61,7 @@ static inline enum obj_type obj_type(const enum obj_type *t) } static inline struct connection *__objt_conn(enum obj_type *t) { - return ((struct connection *)(((char *)(t)) - ((long)&((struct connection *)0)->obj_type))); + return ((struct connection *)(((char *)(t)) - ((long)&((struct connection *)0)->obj_type))); /* { dg-bogus "may result in an unaligned pointer value" "Fixed in r14-6517-gb7e4a4c626e" { target short_enums } } */ } static inline struct connection *objt_conn(enum obj_type *t) {