public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Add a testcase for PR 84799
@ 2018-03-12 13:29 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2018-03-12 13:29 UTC (permalink / raw)
  To: gcc-patches

This is introduced by r258390 and fixed by r258415.

I am checking in this patch to add a testcase for PR 84799.


H.J.
---
	* gcc.dg/pr84799.c: New test.
---
 gcc/testsuite/ChangeLog        |  4 ++++
 gcc/testsuite/gcc.dg/pr84799.c | 29 +++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 gcc/testsuite/gcc.dg/pr84799.c

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c13747ad1b6..c7193069550 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2018-03-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* gcc.dg/pr84799.c: New test.
+
 2018-03-12  Richard Biener  <rguenther@suse.de>
 
 	PR tree-optimization/84803
diff --git a/gcc/testsuite/gcc.dg/pr84799.c b/gcc/testsuite/gcc.dg/pr84799.c
new file mode 100644
index 00000000000..2b3a48f9e34
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr84799.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+int a, g;
+long b, f;
+short c, d, e;
+
+static void fn1 ()
+{
+  if (a)
+    {
+      long i = 5, j = b / i | c;
+      int k = b % (d % i) & j;
+      short l = ~f % (-d / j ^ -e), m = e << (d - l);
+      if (k)
+        m = d;
+      i = d | (i & b);
+      g = (c | ~f) % i + l;
+      e = (c - f) & e;
+      d = m;
+    }
+}
+
+int main ()
+{
+  b |= 1;
+  fn1 ();
+  return 0; 
+}
-- 
2.14.3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-12 13:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-12 13:29 [PATCH] Add a testcase for PR 84799 H.J. Lu

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).