This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Restrict pointers
Daniel Berlin <dberlin@dberlin.org> writes:
>> Currently there is no special handling for restrict pointers (unless
>> the
>> generic alias set routines in alias.c support it).
>>
>
> This isn't quite right.
> I implemented handling of restrict pointers in the flow insensitive
> aliasing part (through probably not as fully as it could be, i'm not
> sure).
Dan, could you please take a look at why the code below is not
optimized?
void bar0 (int * __restrict__ arr1, int * __restrict__ arr2)
{
arr1[0] = 1;
arr2[0] = 1;
if (arr1[0] != 1)
link_error ();
}
This is PR14187.