view gcc/testsuite/gcc.dg/pr76783.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do run } */
/* { dg-require-effective-target int128 } */
/* { dg-options "-Og -w -Wno-psabi" } */

typedef unsigned __int128 u128;
typedef unsigned __int128 v64u128 __attribute__ ((vector_size (64)));

u128 __attribute__ ((noinline, noclone))
foo (unsigned c, v64u128 v)
{
  v64u128 u;
  if (c) {
    u = (v64u128){(u128)0, (u128)0};
  } else {
    u = (v64u128){(u128)0, (u128)1};
  }
  u += v;
  return u[1];
}

int
main ()
{
  u128 x = foo (0, (v64u128){ });
  if (x != 1)
    __builtin_abort();
  return 0;
}