This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed, PATCH]: Add a testcase for PR tree-optimization/67077
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 3 Aug 2015 09:59:53 -0700
- Subject: [committed, PATCH]: Add a testcase for PR tree-optimization/67077
- Authentication-results: sourceware.org; auth=none
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67077
is fixed by
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=226089
I checked in this patch to add a testcase for PR tree-optimization/67077.
Index: ChangeLog
===================================================================
--- ChangeLog (revision 226516)
+++ ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2015-08-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR tree-optimization/67077
+ * gcc.dg/pr67077.c: New test.
+
2015-08-03 Jeff Law <law@redhat.com>
PR middle-end/66314
Index: gcc.dg/pr67077.c
===================================================================
--- gcc.dg/pr67077.c (revision 0)
+++ gcc.dg/pr67077.c (working copy)
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-Wall -O2" } */
+
+unsigned char buffer[8];
+unsigned long
+foo (void)
+{
+ unsigned long i;
+ i = buffer[0];
+ if (i >= 8)
+ return i - 7;
+ i++;
+ while (i > 8)
+ {
+ if (buffer[i-1] != 0)
+ return 0;
+ i--;
+ }
+ return 1;
+}