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
/
null-3.c
blob
f58562c63b8c8f34ec3071dee1d9a883abb33844
1
/* { dg-do run } */
2
/* { dg-options "-fsanitize=null -w" } */
3
/* { dg-shouldfail "ubsan" } */
4
5
int
6
foo
(
int
*
p
)
7
{
8
return
*
p
;
9
}
10
11
int
12
main
(
void
)
13
{
14
int
**
p
=
0
;
15
return
foo
(*
p
);
16
}
17
18
/* { dg-output "load of null pointer of type 'int \\*'(\n|\r\n|\r)" } */