public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: gcc-patches@gcc.gnu.org
Subject: [committed] Add testcase for PR rtl-optimization/81020
Date: Tue, 28 Nov 2017 10:56:00 -0000	[thread overview]
Message-ID: <20171128102446.GB2320@tucnak> (raw)

Hi!

This testcase was fixed by Segher's r254875:
https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00340.html
on the trunk, so I've committed it to trunk as obvious.
On release branches it still needs fixing.

2017-11-28  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/81020
	* gcc.dg/pr81020.c: New test.

--- gcc/testsuite/gcc.dg/pr81020.c.jj	2017-11-27 18:49:06.659907687 +0100
+++ gcc/testsuite/gcc.dg/pr81020.c	2017-11-27 18:49:00.431982443 +0100
@@ -0,0 +1,23 @@
+/* PR rtl-optimization/81020 */
+/* { dg-do run } */
+/* { dg-options "-O -fno-tree-bit-ccp -fno-tree-coalesce-vars -fno-tree-vrp" } */
+
+unsigned v = 4;
+
+unsigned long long __attribute__((noipa))
+foo (unsigned x)
+{
+  unsigned a = v;
+  a &= 1;
+  x |= 0 < a;
+  a >>= 31;
+  return x + a;
+}
+
+int
+main ()
+{
+  if (foo (2) != 2)
+    __builtin_abort ();
+  return 0;
+}

	Jakub

             reply	other threads:[~2017-11-28 10:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-28 10:56 Jakub Jelinek [this message]
2017-11-28 16:05 ` Christophe Lyon

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=20171128102446.GB2320@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=segher@kernel.crashing.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).