Debian Codegraph @

gcc/testsuite/c-c++-common/analyzer/strlen-pr111361.c

raw
1 #include "analyzer-decls.h"
2
3 typedef int __attribute__((__vector_size__ (32))) V;
4
5 typedef __SIZE_TYPE__ size_t;
6
7 static size_t __attribute__((noinline))
8 call_strlen (const char *p)
9 {
10 return __builtin_strlen (p);
11 }
12
13 void
14 foo (void *out)
15 {
16 V v = (V) { };
17 __analyzer_eval (call_strlen ((const char *)&v) == 0); /* { dg-warning "TRUE" } */
18 }