public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@gmail.com>
To: "Torbjörn SVENSSON" <torbjorn.svensson@foss.st.com>
Cc: gcc-patches@gcc.gnu.org, jason@redhat.com,
	richard.guenther@gmail.com,  jlaw@ventanamicro.com,
	hjl.tools@gmail.com, oliva@adacore.com,  yvan.roux@foss.st.com
Subject: Re: [PATCH] testsuite: xfail test for arm
Date: Sat, 9 Mar 2024 01:23:04 -0800	[thread overview]
Message-ID: <CA+=Sn1nLYugm95-7n9nTuFHX-re_dW9yCPokF0cHpyuQZ6fqDw@mail.gmail.com> (raw)
In-Reply-To: <20240309090207.2960918-1-torbjorn.svensson@foss.st.com>

On Sat, Mar 9, 2024 at 1:07 AM Torbjörn SVENSSON
<torbjorn.svensson@foss.st.com> wrote:
>
> I don't know if this affects other targets than arm-none-eabi, so I
> used arm-*-*. If you think it should be *-*-* or some other target
> selector, please let me know what to use instead.
>
> Ok for releases/gcc-13?

Most likely should be short_enums instead of arm*-*-* (I think the old
arm non-eabi didn't use short enums) due to the fix
r14-6517-gb7e4a4c626e applies when -fshort-enums is used.
Also if you are adding a dg-bogus to the branch, it might makes sense
to the same to the trunk (obviously without the xfail part).
Also makes sense to add a reference to r14-6517-gb7e4a4c626e to the
dg-bogus in the source too.

Thanks,
Andrew Pinski

>
> --
>
> On arm-none-eabi, the test case fails with
> .../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]
>
> The error was fixed in basepoints/gcc-14-6517-gb7e4a4c626e, but it
> was considered to be a too big change to be backported and thus, the
> failing test is marked xfail in GCC13.
>
> gcc/testsuite/ChangeLog:
>         * gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c:
>         Added dg-bogus with xfail on offending line for arm-*-*.
>
> Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
> ---
>  .../null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c         | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
> index 2a9c715c32c..461d5f1199c 100644
> --- a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
> +++ b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
> @@ -60,7 +60,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 *)(((void *)(t)) - ((long)&((struct connection *)0)->obj_type)));
> + return ((struct connection *)(((void *)(t)) - ((long)&((struct connection *)0)->obj_type))); /* { dg-bogus "may result in an unaligned pointer value" "" { xfail arm-*-* } } */
>  }
>  static inline struct connection *objt_conn(enum obj_type *t)
>  {
> --
> 2.25.1
>

  reply	other threads:[~2024-03-09  9:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-22 21:12 [PATCH 1/2] c-family: -Waddress-of-packed-member and casts Jason Merrill
2023-11-22 21:12 ` [PATCH 2/2] c-family: rename warn_for_address_or_pointer_of_packed_member Jason Merrill
2023-12-09  2:22 ` [PATCH 1/2] c-family: -Waddress-of-packed-member and casts Alexandre Oliva
2023-12-11  7:28 ` Richard Biener
2024-02-07 16:19   ` Torbjorn SVENSSON
2024-02-22  8:51     ` [PING] " Torbjorn SVENSSON
2024-02-28 23:07       ` Jason Merrill
2024-03-09  9:02         ` [PATCH] testsuite: xfail test for arm Torbjörn SVENSSON
2024-03-09  9:23           ` Andrew Pinski [this message]
2024-03-11 10:23             ` [PATCH v2] testsuite: xfail test for short_enums Torbjörn SVENSSON
2024-03-12 13:21               ` Jason Merrill
2024-03-13 14:18                 ` [comitted] testsuite: target " Torbjörn SVENSSON
2024-03-13 14:22                 ` [PATCH v2] testsuite: xfail " Torbjorn SVENSSON
2024-03-15  8:33                   ` [committed] testsuite: Added missing } in the dg-bogus comment [PR114343] Torbjörn SVENSSON

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='CA+=Sn1nLYugm95-7n9nTuFHX-re_dW9yCPokF0cHpyuQZ6fqDw@mail.gmail.com' \
    --to=pinskia@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    --cc=jason@redhat.com \
    --cc=jlaw@ventanamicro.com \
    --cc=oliva@adacore.com \
    --cc=richard.guenther@gmail.com \
    --cc=torbjorn.svensson@foss.st.com \
    --cc=yvan.roux@foss.st.com \
    /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).