Debian Codegraph @

gcc/testsuite/gcc.dg/analyzer/torture/fold-ptr-arith-pr105784.c

raw
1 /* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
2
3 #include "../analyzer-decls.h"
4
5 extern _Bool quit_flag;
6 extern void char_charset (int);
7
8 static void
9 __analyzer_ccl_driver (int *source, int src_size)
10 {
11 int *src = source, *src_end = src + src_size;
12 int i = 0;
13
14 while (!quit_flag)
15 {
16 if (src < src_end)
17 {
18 __analyzer_dump_path (); /* { dg-message "path" } */
19 i = *src++; /* { dg-bogus "uninit" } */
20 }
21 char_charset (i);
22 }
23 }
24
25 void
26 Fccl_execute_on_string (char *str, long str_bytes)
27 {
28 while (1)
29 {
30 char *p = str;
31 char *endp = str + str_bytes;
32 int source[1024];
33 int src_size = 0;
34
35 while (src_size < 1024 && p < endp)
36 {
37 __analyzer_dump_path (); /* { dg-message "path" } */
38 source[src_size++] = *p++;
39 }
40
41 __analyzer_ccl_driver (source, src_size);
42 }
43 }