This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix aliasing problem with fortran


> The problem in my testcase is that the array is multidimensional, thus
> its dimensions etc. are described in a structure:

Multidimensional doesn't make any difference. The descriptor is used for 
assumed shape arguments.

>   int4 a[10];
>   int4[0:] * b.0;
>   struct array2_int4 & b;
>   struct array2_int4 parm.9;
>
>   ...
>   D.517 = (int4[0:] *) &a[0];
>   parm.9.data = D.517;
>   b = (struct array2_int4 &) &parm.9;
>   ...
>   b.0 = (int4[0:] *) b->data;
>
> Without my patch, b->data and parm.9.data have different types,
> thus there is no dependence between the load and the store to data.

Oh! you mean PR16898?

Even with your patch, don't *b and param.9 have different types? In which case 
couldn't the problem still occur, even if the data fields happen to have the 
same type? It might not occur now, but I guess it could if we start passing 
alias information down from trees to rtl.

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]