summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/ubsan/shift-8.c
blob: 8717f3f342765d923a9d7474b24fddd13e5845f4 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/* { dg-do compile } */
/* { dg-options "-fsanitize=undefined" } */
/* { dg-additional-options "-std=gnu11" { target c } } */
/* { dg-additional-options "-std=c++11" { target c++ } } */

signed char
fn1 (signed char x, unsigned long y)
{
  return x << y;
}

short int
fn2 (short int x, unsigned long y)
{
  return x << y;
}

int
fn3 (int x, unsigned long y)
{
  return x << y;
}

long int
fn4 (long int x, unsigned long y)
{
  return x << y;
}

long long int
fn5 (long long int x, unsigned long y)
{
  return x << y;
}

signed char
fn6 (signed char x, unsigned long long y)
{
  return x << y;
}

short int
fn7 (short int x, unsigned long long y)
{
  return x << y;
}

int
fn8 (int x, unsigned long long y)
{
  return x << y;
}

long int
fn9 (long int x, unsigned long long y)
{
  return x << y;
}

long long int
fn10 (long long int x, unsigned long long y)
{
  return x << y;
}