public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Dimitar Dimitrov <dimitar@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-93] testsuite: Skip cases for default_packed targets
Date: Tue,  3 May 2022 18:58:02 +0000 (GMT)	[thread overview]
Message-ID: <20220503185802.5F137395B40D@sourceware.org> (raw)

https://gcc.gnu.org/g:8381665fdd0ba9bea2ef6274cd995cf591677de3

commit r13-93-g8381665fdd0ba9bea2ef6274cd995cf591677de3
Author: Dimitar Dimitrov <dimitar@dinux.eu>
Date:   Fri Apr 15 22:58:50 2022 +0300

    testsuite: Skip cases for default_packed targets
    
    The memchr test cases expect padding to be present in structures.  But
    this is not true for targets which pack by default.  Skip these test
    cases in order to avoid static assert errors when checking field offsets.
    
    gcc/testsuite/ChangeLog:
    
            * gcc.dg/memchr.c: Skip for default_packed targets.
            * gcc.dg/memcmp-3.c: Ditto.
    
    Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>

Diff:
---
 gcc/testsuite/gcc.dg/memchr.c   | 3 ++-
 gcc/testsuite/gcc.dg/memcmp-3.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/memchr.c b/gcc/testsuite/gcc.dg/memchr.c
index fb21d58b476..27524b82520 100644
--- a/gcc/testsuite/gcc.dg/memchr.c
+++ b/gcc/testsuite/gcc.dg/memchr.c
@@ -1,6 +1,7 @@
 /* PR middle-end/78257 - missing memcmp optimization with constant arrays
    { dg-do compile }
-   { dg-options "-O -Wall -fdump-tree-optimized" } */
+   { dg-options "-O -Wall -fdump-tree-optimized" }
+   { dg-skip-if "test assumes structs are not packed" { default_packed } } */
 
 typedef __INT8_TYPE__  int8_t;
 typedef __INT16_TYPE__ int16_t;
diff --git a/gcc/testsuite/gcc.dg/memcmp-3.c b/gcc/testsuite/gcc.dg/memcmp-3.c
index b5b8ac1209f..8ddde996c2f 100644
--- a/gcc/testsuite/gcc.dg/memcmp-3.c
+++ b/gcc/testsuite/gcc.dg/memcmp-3.c
@@ -1,7 +1,8 @@
 /* PR middle-end/78257 - missing memcmp optimization with constant arrays
    { dg-do compile }
    { dg-options "-O -Wall -fdump-tree-optimized" }
-   { dg-skip-if "missing data representation" { "pdp11-*-*" } } */
+   { dg-skip-if "missing data representation" { "pdp11-*-*" } }
+   { dg-skip-if "test assumes structs are not packed" { default_packed } } */
 
 #define offsetof(T, m) __builtin_offsetof (T, m)


                 reply	other threads:[~2022-05-03 18:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220503185802.5F137395B40D@sourceware.org \
    --to=dimitar@gcc.gnu.org \
    --cc=gcc-cvs@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).