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
Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git]
/
main
/
gcc
/
testsuite
/
c-c++-common
/
ubsan
/
save-expr-1.c
blob
19b1eb08bd662c01fc0cc61c5f615c9befd160d6
1
/* { dg-do compile } */
2
/* { dg-options "-fsanitize=shift -Wall -Werror -O" } */
3
4
#include <stdio.h>
5
6
static int
x
;
7
int
8
main
(
void
)
9
{
10
fputs
(
"UBSAN TEST START
\n
"
,
stderr
);
11
12
int
o
=
1
;
13
int
y
=
x
<<
o
;
14
15
fputs
(
"UBSAN TEST END
\n
"
,
stderr
);
16
return
y
;
17
}
18
19
/* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */