From patchwork Tue May 3 19:00:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitar Dimitrov X-Patchwork-Id: 53431 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 0DB4A395C057 for ; Tue, 3 May 2022 19:01:52 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from server28.superhosting.bg (server28.superhosting.bg [217.174.156.11]) by sourceware.org (Postfix) with ESMTPS id 7A8D3395B06E for ; Tue, 3 May 2022 19:00:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7A8D3395B06E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dinux.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dinux.eu DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dinux.eu; s=default; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=hyclQhryU1cmXXA9elNB6fjReIL85ogQI+iGz4D+oW8=; b=ORmOKlQFEuzy078JGxkW8Z/hc3 KfGgnHPoJuuCZ9yg/ZbLE93CF1H0YYpuB2cwQFR/0W+GbXE8uuVaLIbldpK9FSBkTguxcC9lnw0qL 4EE1vKGFd+RAd5fj/IFdw9jqaCEBktI27KvmJIcVvwhUCD+cOwJCizRTUMXczYk0K1AFDzS9sh0bh dSYxZFMRHP+F/ilhwa05IFDrHTdjBM6kvnyXKQN/b7Ll6WE1fl7LeEDGwQ7ZJL0kNBnqjpUK87/H3 JnDpLyPwWzO1Wh0IIZJhZII1rwX0JLAmYHDTIrIv6iMFJXCPL/9RSlvtYI848e7FPSUDcsRENn04l Lktbk9jQ==; Received: from [95.87.234.74] (port=46810 helo=kendros.lan) by server28.superhosting.bg with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nlxlC-000BL3-PP; Tue, 03 May 2022 22:00:36 +0300 From: Dimitar Dimitrov To: gcc-patches@gcc.gnu.org Subject: [PATCH][committed] testsuite: Annotate Wattributes-8.c for default_packed Date: Tue, 3 May 2022 22:00:13 +0300 Message-Id: <20220503190015.300440-3-dimitar@dinux.eu> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-OutGoing-Spam-Status: No, score=-2.9 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server28.superhosting.bg X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - dinux.eu X-Get-Message-Sender-Via: server28.superhosting.bg: authenticated_id: dimitar@dinux.eu X-Authenticated-Sender: server28.superhosting.bg: dimitar@dinux.eu X-Source: X-Source-Args: X-Source-Dir: X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, HAS_X_OUTGOING_SPAM_STAT, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 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 Sender: "Gcc-patches" Place markers in test case to handle targets which pack structures by default. Validated on pru-none-elf. Committed as obvious. gcc/testsuite/ChangeLog: * gcc.dg/Wattributes-8.c: Add annotations for default_packed targets. Signed-off-by: Dimitar Dimitrov --- gcc/testsuite/gcc.dg/Wattributes-8.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.dg/Wattributes-8.c b/gcc/testsuite/gcc.dg/Wattributes-8.c index a4b4c00c08f..8f5483e2d7a 100644 --- a/gcc/testsuite/gcc.dg/Wattributes-8.c +++ b/gcc/testsuite/gcc.dg/Wattributes-8.c @@ -24,8 +24,10 @@ int c ATTR ((aligned (2))); // okay (reduces alignment) ASSERT (_Alignof (c) == 2); struct { - int a ATTR ((packed, aligned (2))); /* { dg-bogus "\\\[-Wattributes" } */ - int b ATTR ((aligned (2), packed)); /* { dg-bogus "\\\[-Wattributes" } */ + int a ATTR ((packed, aligned (2))); /* { dg-bogus "\\\[-Wattributes" "" { target { ! default_packed } } } */ + /* { dg-warning "attribute ignored" "" { target { default_packed } } .-1 } */ + int b ATTR ((aligned (2), packed)); /* { dg-bogus "\\\[-Wattributes" "" { target { ! default_packed } } } */ + /* { dg-warning "attribute ignored" "" { target { default_packed } } .-1 } */ /* Avoid exercising this since the attribute has no effect yet there is no warning.