aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/ubsan/shift-9.c
blob: 5f3fc3a43d32c221aaec41b530e50fd4b87b1142 (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
27
28
29
30
/* PR sanitizer/77823 */
/* { dg-do compile { target int128 } } */
/* { dg-options "-fsanitize=undefined -Wno-psabi -w" } */

typedef unsigned V __attribute__((vector_size(32)));
typedef unsigned __int128 W __attribute__((vector_size(32)));

V
foo (V v)
{
  return v << 30;
}

V
bar (V v, V w)
{
  return v << w;
}

W
baz (W v)
{
  return v << 30;
}

W
boo (W v, W w)
{
  return v << w;
}