On Tue, Nov 24, 2015 at 11:39 AM, Kyrill Tkachov <kyrylo.tkac...@arm.com> wrote:
> Hi all,
>
> The ICE in this PR occurs when trying to dump the CFG to a .dot file.
> The i > vc assert at the bottom of the loop in get_loop_body_in_bfs_order
> gets triggered when i == 1 and vc == 1.  This is not a problem for that loop
> because it contains only a header and it's not going to go around the loop
> again
> to access uninitialized memory in the blocks array.
>
> Richi suggested restructuring the loop to initialise the blocks array with
> the header
> early on and moving the assert to the beginning of the loop.
> This fix works as far as I can test.
>
> Bootstrapped and tested on arm, aarch64, x86_64.
>
> Ok for trunk?

Ok.

Thanks,
Richard.

> Thanks,
> Kyrill
>
> 2015-11-24  Richard Biener  <rguent...@suse.de>
>             Kyrylo Tkachov  <kyrylo.tkac...@arm.com>
>
>     PR middle-end/68375
>     * cfgloop.c (get_loop_body_in_bfs_order): Restructure loop to avoid
>     bogus assertion.
>
> 2015-11-24  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>
>
>     PR middle-end/68375
>     * gcc.dg/pr68375.c: New test.

Reply via email to