repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git]
/
gcc
/
testsuite
/
c-c++-common
/
ubsan
/
save-expr-4.c
blob
aa34a70ede70dd7e895cc3061bbe798a990460b1
1
/* { dg-do compile } */
2
/* { dg-options "-fsanitize=shift -Wall -Werror -O" } */
3
4
int
x
;
5
6
int
7
foo
(
int
i
,
unsigned int
u
)
8
{
9
return
(
i
%
u
) << (
x
/
u
);
10
}
11
12
int
13
bar
(
int
i
,
unsigned int
u
)
14
{
15
return
(((
x
%
u
) << (
u
/
i
)) >>
x
);
16
}