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
middle-end: Fix stalled swapped condition code value [PR115836]
[official-gcc.git]
/
gcc
/
testsuite
/
c-c++-common
/
analyzer
/
null-deref-pr110520.c
blob
b57027689eededd25eefe1e51961ee3d1a1a1946
1
#include
"analyzer-decls.h"
2
3
int
main
(
void
) {
4
char
buf
[] =
"0"
;
5
int
*
ptr
= (
int
*)(
__builtin_strlen
(
buf
) -
1
);
6
__analyzer_eval
((
__builtin_strlen
(
buf
)) ==
1
);
/* { dg-warning "TRUE" } */
7
*
ptr
=
10086
;
/* { dg-warning "dereference of NULL 'ptr'" } */
8
}