public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Sandiford <richard.sandiford@arm.com>
To: Dimitar Dimitrov <dimitar@dinux.eu>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 4/4] testsuite: Add default_packed filters
Date: Mon, 20 Jul 2020 18:57:54 +0100	[thread overview]
Message-ID: <mpt5zaiyspp.fsf@arm.com> (raw)
In-Reply-To: <20200720163106.27849-5-dimitar@dinux.eu> (Dimitar Dimitrov's message of "Mon, 20 Jul 2020 19:31:06 +0300")

Dimitar Dimitrov <dimitar@dinux.eu> 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 <dimitar@dinux.eu>
> ---
>  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 <stddef.h>
>  
> -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 } */

  reply	other threads:[~2020-07-20 17:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20 16:31 [PATCH 0/4] testsuite: Add markers for default_packed targets Dimitar Dimitrov
2020-07-20 16:31 ` [PATCH 1/4] testsuite: Filter unaligned pointer value warning Dimitar Dimitrov
2020-07-20 17:51   ` Richard Sandiford
2020-07-20 16:31 ` [PATCH 2/4] testsuite: Add expected warning for packed attribute Dimitar Dimitrov
2020-07-20 17:54   ` Richard Sandiford
2020-07-20 16:31 ` [PATCH 3/4] testsuite: Relax pattern to include "packed" targets Dimitar Dimitrov
2020-07-20 17:56   ` Richard Sandiford
2020-07-20 16:31 ` [PATCH 4/4] testsuite: Add default_packed filters Dimitar Dimitrov
2020-07-20 17:57   ` Richard Sandiford [this message]
2020-07-21 15:58 ` [PATCH 0/4] testsuite: Add markers for default_packed targets Dimitar Dimitrov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mpt5zaiyspp.fsf@arm.com \
    --to=richard.sandiford@arm.com \
    --cc=dimitar@dinux.eu \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).