1 /* { dg-additional-options "-Wno-analyzer-too-complex -Wno-analyzer-symbol-too-complex" } */
3 #include "../../gcc.dg/analyzer/analyzer-decls.h"
5 extern char *strtok (char *str
, const char *delim
);
9 char buffer
[] = { 'a', 'x', 'b', 'y', 'c', '\0' };
11 char *p1
= strtok (buffer
, "x");
13 | buffer[] = { 'a', '\0', 'b', 'y', 'c', '\0' },
19 char *p2
= strtok (NULL
, "y"); /* note new delimiter. */
21 | buffer[] = { 'a', '\0', 'b', '\0', 'c', '\0' },
27 char *p3
= strtok (NULL
, "z"); /* again new delimiter. */
29 | buffer[] = { 'a', '\0', 'b', '\0', 'c', '\0' },
35 char *p4
= strtok (NULL
, "z");
36 /* Should result in p4 == NULL, and:
37 | buffer[] = { 'a', '\0', 'b', '\0', 'c', '\0' },
42 /* We don't yet model strtok closely enough to capture
43 these exact behaviors. */