From: H.J. Lu Date: Mon, 3 Aug 2015 16:58:03 +0000 (+0000) Subject: Add a testcase for PR tree-optimization/67077 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=472fd3cce417da0584c30669e300d75a0bcdb3d1;p=gcc.git Add a testcase for PR tree-optimization/67077 PR tree-optimization/67077 * gcc.dg/pr67077.c: New test. From-SVN: r226518 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0a841b51398..44d7eb95882 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-08-03 H.J. Lu + + PR tree-optimization/67077 + * gcc.dg/pr67077.c: New test. + 2015-08-03 Jeff Law PR middle-end/66314 diff --git a/gcc/testsuite/gcc.dg/pr67077.c b/gcc/testsuite/gcc.dg/pr67077.c new file mode 100644 index 00000000000..555b1e3a04a --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr67077.c @@ -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; +}