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
Merge from trunk
[official-gcc.git]
/
gcc
/
testsuite
/
c-c++-common
/
ubsan
/
undefined-1.c
blob
1229b711fe92147a3ac484bb714e730ec5be77d9
1
/* { dg-do run } */
2
/* { dg-options "-fsanitize=undefined" } */
3
/* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */
4
5
int
6
foo
(
int
x
,
int
y
)
7
{
8
const int
z
=
2
;
9
if
(
z
&
1
)
10
return
x
<<
y
;
11
return
0
;
12
}
13
14
int
15
bar
(
int
x
,
int
y
)
16
{
17
return
x
+
y
;
18
}
19
20
int
21
main
(
void
)
22
{
23
foo
(
3
,
2
);
24
bar
(
12
,
42
);
25
return
0
;
26
}