view gcc/testsuite/gcc.dg/pr76783.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +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;
}