aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/pr105613.c
blob: 6e51e191ec0b1ccf26ef6a04d201710fcba9e892 (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
25
26
/* PR target/105613 */
/* { dg-do run { target int128 } } */

typedef unsigned __int128 __attribute__((__vector_size__ (16))) V;

void
foo (V v, V *r)
{
  *r = v != 0;
}

int
main ()
{
  V r;
  foo ((V) {5}, &r);
  if (r[0] != ~(unsigned __int128) 0)
    __builtin_abort ();
  foo ((V) {0x500000005ULL}, &r);
  if (r[0] != ~(unsigned __int128) 0)
    __builtin_abort ();
  foo ((V) {0}, &r);
  if (r[0] != 0)
    __builtin_abort ();
  return 0;
}