[patch, rfc] Make store motion use alias oracle

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Wed Jan 31 21:06:00 GMT 2007


Hello,

> Thanks for the prompt reply the probious testcase was fixed.  However this
> one still
> fails with ICE in lim pass:

replace

load = build2_gimple (GIMPLE_MODIFY_STMT, tmp_var, ref->mem);

with

load = build2_gimple (GIMPLE_MODIFY_STMT, tmp_var, unshare_expr (ref->mem));

in excute_sm (I do not want to flood the list with another 2000 line
patch that I am not really submitting for review just now).

Zdenek

> struct a { int X; int Y; };
> 
> int
> foo (struct a *A)
> {
>   int i, j;
> 
>   for (i = 0; i < 8; i++)
>     {
>       A[i].X = 0;
>       A[i].Y = 0;
> 
>       for (j = 0; j < 5; j++)
>         {
>           A[i].X += j;
>           A[i].Y += j;
>         }
>     }
> }
> 
> =cut
> 
>  % ~/cc1 -O2 b.c
>  foo
> Analyzing compilation unit
> Performing interprocedural optimizations
>  <visibility> <early_local_cleanups> <inline> <static-var> <pure-const>
> <type-escape-var>Assembling functions:
>  foo
> b.c: In function 'foo':
> b.c:5: error: incorrect sharing of tree nodes
> # VUSE <SMT.5_40> { SMT.5 }
> D___XD__I_lsm.30_1 = D.1606_8->X;
> 
> D.1606_8->X;
> 
> b.c:5: error: incorrect sharing of tree nodes
> # VUSE <SMT.5_40> { SMT.5 }
> D___YD__I_lsm.31_37 = D.1606_8->Y;
> 
> D.1606_8->Y;
> 
> b.c:5: internal compiler error: verify_stmts failed



More information about the Gcc-patches mailing list