Debian Codegraph @

gcc/testsuite/c-c++-common/ubsan/shift-9.c

raw
1 /* PR sanitizer/77823 */
2 /* { dg-do compile { target int128 } } */
3 /* { dg-options "-fsanitize=undefined -Wno-psabi -w" } */
4
5 typedef unsigned V __attribute__((vector_size(32)));
6 typedef unsigned __int128 W __attribute__((vector_size(32)));
7
8 V
9 foo (V v)
10 {
11 return v << 30;
12 }
13
14 V
15 bar (V v, V w)
16 {
17 return v << w;
18 }
19
20 W
21 baz (W v)
22 {
23 return v << 30;
24 }
25
26 W
27 boo (W v, W w)
28 {
29 return v << w;
30 }