From patchwork Mon Jul 20 16:31:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitar Dimitrov X-Patchwork-Id: 1332490 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=dinux.eu Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=dinux.eu header.i=@dinux.eu header.a=rsa-sha256 header.s=default header.b=NyuJKv5N; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B9S1356kSz9sWl for ; Tue, 21 Jul 2020 02:31:51 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7B2FB38618A2; Mon, 20 Jul 2020 16:31:35 +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 6224F3861862 for ; Mon, 20 Jul 2020 16:31:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6224F3861862 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dinux.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dimitar@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:References:In-Reply-To: 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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=q3rSIrq49WaenHx5GUp0ZGn02wgOWjHIw+D79QF3fFw=; b=NyuJKv5NMYHoVHpgudO6ok9sfM Yr400i8tQTopZdFs53i1MttREQb/KhMi35hnxY5j82e9ON+snM7NlQQUdA7Hrk9N6vY/SmQHHy6Cr /+2P5cF54Qy0GPLICi6KsKVy+hxSFNMCRzO0oLeFJO7glc61ZuvoXJM9N+aHDgxec1AN5YO/HSQHo Z8sMvYLc0wojAjCNCk8aYwV7+foCcfqP1HB/PO2elvCoEWwIewmyeTedYQcUhA78zWp+9yqHYlcp1 perGPSVrj8R3mdOYbgjU6UssqXdVLbBw3eKrra1DRwsHjInawhbm2gK9SleR1oHwRV2I9dQUplEGX GaAJj3Jw==; Received: from [95.87.234.74] (port=60198 helo=localhost.localdomain) by server28.superhosting.bg with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1jxYhO-00046m-87; Mon, 20 Jul 2020 19:31:32 +0300 From: Dimitar Dimitrov To: gcc-patches@gcc.gnu.org Subject: [PATCH 4/4] testsuite: Add default_packed filters Date: Mon, 20 Jul 2020 19:31:06 +0300 Message-Id: <20200720163106.27849-5-dimitar@dinux.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200720163106.27849-1-dimitar@dinux.eu> References: <20200720163106.27849-1-dimitar@dinux.eu> MIME-Version: 1.0 X-OutGoing-Spam-Status: No, score=-1.0 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=-13.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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@gcc.gnu.org Sender: "Gcc-patches" Fix test cases assumptions that target has alignment constraints. gcc/testsuite/ChangeLog: * gcc.dg/attr-copy-4.c: Unpacked may still have alignment of 1 on targets with default_packed. * gcc.dg/c11-align-9.c: Remove AVR target filter and replace with default_packed filter. Signed-off-by: Dimitar Dimitrov --- gcc/testsuite/gcc.dg/attr-copy-4.c | 1 + gcc/testsuite/gcc.dg/c11-align-9.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.dg/attr-copy-4.c b/gcc/testsuite/gcc.dg/attr-copy-4.c index 796724bb950..01fae3f78d4 100644 --- a/gcc/testsuite/gcc.dg/attr-copy-4.c +++ b/gcc/testsuite/gcc.dg/attr-copy-4.c @@ -32,6 +32,7 @@ extern const struct PackedA packed; struct Unpacked { int i; char c; }; Assert (__alignof (struct Unpacked) > 1); +/* { dg-error "size of array .* is negative" "" { target default_packed } .-1 } */ /* Verify that copying the packed attribute to the declaration of an object is ignored with a warning. (There should be diff --git a/gcc/testsuite/gcc.dg/c11-align-9.c b/gcc/testsuite/gcc.dg/c11-align-9.c index 3c9cf55756e..6a0d4248f1b 100644 --- a/gcc/testsuite/gcc.dg/c11-align-9.c +++ b/gcc/testsuite/gcc.dg/c11-align-9.c @@ -2,8 +2,8 @@ are at least some alignment constraints), case of compound literals. */ /* { dg-do compile } */ /* { dg-options "-std=c11 -pedantic-errors" } */ -/* { dg-skip-if "no alignment constraints" { "avr-*-*" } } */ #include -max_align_t *p = &(_Alignas (_Alignof (char)) max_align_t) { 1 }; /* { dg-error "reduce alignment" } */ +max_align_t *p = &(_Alignas (_Alignof (char)) max_align_t) { 1 }; +/* { dg-error "reduce alignment" "" { target { ! default_packed } } .-1 } */