From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 4DFBD3851C39 for ; Mon, 20 Jul 2020 17:57:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4DFBD3851C39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=richard.sandiford@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 00532106F; Mon, 20 Jul 2020 10:57:57 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.126]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 817093F66F; Mon, 20 Jul 2020 10:57:56 -0700 (PDT) From: Richard Sandiford To: Dimitar Dimitrov Mail-Followup-To: Dimitar Dimitrov , gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH 4/4] testsuite: Add default_packed filters References: <20200720163106.27849-1-dimitar@dinux.eu> <20200720163106.27849-5-dimitar@dinux.eu> Date: Mon, 20 Jul 2020 18:57:54 +0100 In-Reply-To: <20200720163106.27849-5-dimitar@dinux.eu> (Dimitar Dimitrov's message of "Mon, 20 Jul 2020 19:31:06 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, 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: , X-List-Received-Date: Mon, 20 Jul 2020 17:57:58 -0000 Dimitar Dimitrov writes: > 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. OK, thanks. Richard > > 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 } */