[Bug tree-optimization/18694] [4.0 regression] loop miscompilation at -O1 (-ftree-ch)
------- Additional Comments From law at redhat dot com 2004-12-10 18:11 -------
Subject: Re: [4.0 regression] loop
miscompilation at -O1 (-ftree-ch)
On Thu, 2004-12-09 at 05:24 +0000, kazu at cs dot umass dot edu wrote:
> ------- Additional Comments From kazu at cs dot umass dot edu 2004-12-09 05:24 -------
> Updated the testcase like so:
>
> /* PR tree-optimization/18694
>
> The dominator optimization didn't take the PHI evaluation order
> into account when threading an edge. */
>
> extern void abort (void) __attribute__((noreturn));
> extern void exit (int) __attribute__((noreturn));
>
> void __attribute__((noinline))
> foo (int i)
> {
> int next_n = 1;
> int j = 0;
>
> for (; i != 0; i--)
> {
> int n;
>
> for (n = next_n; j < n; j++)
> next_n++;
>
> if (j != n)
> abort ();
> }
> }
>
> int
> main (void)
> {
> foo (2);
> exit (0);
> }
>
>
Can you go ahead and install this into the testsuite? No need to xfail
since we ought to have a patch installed for the problem soon.
jeff
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18694
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
Reply to: