aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr90328.c
blob: a70f3dd425e577213e0012220296c8a9b8df9bd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* { dg-do run } */

void g(int*__restrict x, int*y)
{
  *x = *y;
}

void __attribute__((noipa)) f(int* a,int* b)
{
  for(int i=0;i<1024;++i)
    g(a+i,b+i);
}

int main()
{
  int x[1025];
  for (int i = 0; i < 1025; ++i)
    x[i] = i+1;
  f(x+1, x);
  for (int i = 0; i < 1025; ++i)
    if (x[i] != 1)
      __builtin_abort ();
  return 0;
}