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

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

/* { dg-do run } */
/* { dg-additional-options "-w -Wno-psabi" } */

typedef char U __attribute__ ((vector_size (16)));
typedef unsigned V __attribute__ ((vector_size (16)));

V g;

V
f (V v, U u)
{
  __builtin_memset (&u[v[0]], 0, 1);
  g ^= u[0];
  return g;
}

int
main (void)
{
  V x = f ((V) { 5 }, (U) { 1 });

  if (x[0] != 1 || x[1] != 1 || x[2] != 1 || x[3] != 1)
    __builtin_abort ();
  return 0;
}