aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/ubsan/save-expr-3.c
blob: dd2903bd68229d666a85ef8c8ceb758f8c900ff3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-options "-fsanitize=shift -Wall -Werror -O" } */

int x;

int
foo (int i, int u)
{
  return (i << u) << x;
}

int
bar (int i, int u)
{
  return (i >> u) >> x;
}