public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-5139] testsuite: Add testcase for PR that went latent in GCC 13 [PR107131] Date: Fri, 13 Jan 2023 10:15:36 +0000 (GMT) [thread overview] Message-ID: <20230113101536.4998A3858D32@sourceware.org> (raw) https://gcc.gnu.org/g:add71b95dd27d73d64eee0a9c8f748672b7050f5 commit r13-5139-gadd71b95dd27d73d64eee0a9c8f748672b7050f5 Author: Jakub Jelinek <jakub@redhat.com> Date: Fri Jan 13 11:13:22 2023 +0100 testsuite: Add testcase for PR that went latent in GCC 13 [PR107131] The following testcase is probably latent since r13-3217-gc4d15dddf6b9e. Adding testcase so that it doesn't silently reappear. 2023-01-13 Jakub Jelinek <jakub@redhat.com> PR target/107131 * gcc.dg/pr107131.c: New test. Diff: --- gcc/testsuite/gcc.dg/pr107131.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gcc/testsuite/gcc.dg/pr107131.c b/gcc/testsuite/gcc.dg/pr107131.c new file mode 100644 index 00000000000..458b128f885 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr107131.c @@ -0,0 +1,30 @@ +/* PR target/107131 */ +/* { dg-do run } */ +/* { dg-options "-Os -fno-ipa-vrp -fno-tree-bit-ccp -Wno-psabi" } */ + +typedef unsigned char C; +typedef unsigned long long __attribute__((__vector_size__ (32))) U; +typedef unsigned long long __attribute__((__vector_size__ (64))) V; + +static __attribute__((__noclone__)) C +foo (C o, U x, U y, U z) +{ + V a = __builtin_shufflevector (x, x, 3, 1, 3, 0, 0, 1, 1, 3); + V b = (V) { } >= o; + V c = b <= (V)(b >= (V) { 0, 0, 0, 0, 0, 0x90DF0BE3990AC871ULL }); + U d = __builtin_shufflevector (y, z, 3, 1, 4, 5); + V e = a + c; + U f = ((union { V v; U u[2]; }) e).u[1] + d; + return ((union { U u; C c[32]; }) f).c[9]; +} + +int +main () +{ + if (__SIZEOF_LONG_LONG__ != 8 || __CHAR_BIT__ != 8) + return 0; + C x = foo (0, (U) { }, (U) { }, (U) { }); + if (x != 0xff) + __builtin_abort(); + return 0; +}
reply other threads:[~2023-01-13 10:15 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=20230113101536.4998A3858D32@sourceware.org \ --to=jakub@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: linkBe 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).