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-5150] testsuite: Add another testcase from PR107131
Date: Fri, 13 Jan 2023 16:39:26 +0000 (GMT)	[thread overview]
Message-ID: <20230113163926.9CF6038543AF@sourceware.org> (raw)

https://gcc.gnu.org/g:254cf9552ffb1693f0bc74f6d25601dafafbc144

commit r13-5150-g254cf9552ffb1693f0bc74f6d25601dafafbc144
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Jan 13 17:37:52 2023 +0100

    testsuite: Add another testcase from PR107131
    
    This one is hand reduced to problematic code from optimized dump
    that used to be miscompiled during combine starting with
    r12-303 and fixed with r13-3530 aka PR107172 fix.
    
    2023-01-13  Jakub Jelinek  <jakub@redhat.com>
    
            PR target/107131
            * gcc.c-torture/execute/pr107131.c: New test.

Diff:
---
 gcc/testsuite/gcc.c-torture/execute/pr107131.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gcc/testsuite/gcc.c-torture/execute/pr107131.c b/gcc/testsuite/gcc.c-torture/execute/pr107131.c
new file mode 100644
index 00000000000..d4259f141ba
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr107131.c
@@ -0,0 +1,18 @@
+/* PR target/107131 */
+
+__attribute__((noipa)) unsigned long long
+foo (unsigned char o)
+{
+  unsigned long long t1 = -(long long) (o == 0);
+  unsigned long long t2 = -(long long) (t1 > 10439075533421201520ULL);
+  unsigned long long t3 = -(long long) (t1 <= t2);
+  return t3;
+}
+
+int
+main ()
+{
+  if (foo (0) != -1ULL)
+    __builtin_abort ();
+  return 0;
+}

                 reply	other threads:[~2023-01-13 16:39 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=20230113163926.9CF6038543AF@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: 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).