view gcc/testsuite/gcc.dg/torture/pr90328.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
line wrap: on
line source

/* { 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;
}