Adding a pointless array qualifier to the restrict-1.c test makes it not work
with gcc -O2; we fail to optimize away the call to link_error.

int * __restrict__ a[1];
int * __restrict__ b[1];

extern void link_error (void);

int main()
{
  a[0][0] = 1;
  b[0][0] = 1;
  if (a[0][0] != 1)
    link_error ();
  return 0;
}


-- 
           Summary: GCC ignores restrict on array
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jason at gcc dot gnu dot org
 BugsThisDependsOn: 6392


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41898

Reply via email to