This is the mail archive of the gcc@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: 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.



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