[patch] PR55191 - ICE in tree-ssa-pre.c due to missing fake edge for an infinite loop

Jakub Jelinek jakub@redhat.com
Thu Nov 8 11:00:00 GMT 2012


On Mon, Nov 05, 2012 at 10:59:45PM +0100, Steven Bosscher wrote:
> I hadn't expected that cfganal.c's reverse-CFG DFS would actually
> depend on the order of the basic blocks. The attached patch fixes that
> small oversight...
> 
> Bootstrapped&tested on powerpc64-unknown-linux-gnu. OK for trunk?
> 
> Ciao!
> Steven
> 

Please put the PR number into the ChangeLog entry.

>         * cfganal.c (connect_infinite_loops_to_exit): Call dfs_deadend
> from here.
>         (flow_dfs_compute_reverse_execute): Don't call it here.

Ok.

> @@ -0,0 +1,14 @@
> +/* PR tree-optimization/55191 */
> +/* { dg-do compile } */
> +/* { dg-options "-O2" } */
> +
> +int a, b;
> +
> +void f(void)
> +{
> +  b = a || b;
> +
> +  for(a = 0; a < 2; a++);
> +  while(1);
> +}
> +

No need for the trailing line.

	Jakub



More information about the Gcc-patches mailing list