1 /* { dg-additional-options "-fanalyzer-call-summaries -Wno-analyzer-symbol-too-complex" } */
3 typedef __SIZE_TYPE__
size_t;
4 enum { _ISspace
= ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)) };
5 extern const unsigned short int **__ctype_b_loc(void)
6 __attribute__((__nothrow__
, __leaf__
, __const__
));
7 extern void *malloc(size_t __size
)
8 __attribute__((__nothrow__
, __leaf__
, __malloc__
, __alloc_size__(1)));
9 extern char *strcpy(char *__restrict __dest
, const char *__restrict __src
)
10 __attribute__((__nothrow__
, __leaf__
, __nonnull__(1, 2)));
11 extern size_t strlen(const char *__s
)
12 __attribute__((__nothrow__
, __leaf__
, __pure__
, __nonnull__(1)));
20 static struct mydata
*all_data
;
23 __attribute__((__noreturn__
)) void failed(const char *message
);
25 static char *string_dup(const char *string
) {
28 if ((buf
= (char *) malloc(strlen(string
) + 1)) == ((void *)0))
29 failed("malloc() failed");
31 return strcpy(buf
, string
);
34 static void store_data(const char *name
, const char *type
) {
37 if ((p
= (struct mydata
*)malloc(sizeof(struct mydata
))) == ((void *)0))
38 failed("malloc() failed");
40 p
->link
= (struct mydata
*)((void *)0);
41 p
->name
= string_dup(name
);
42 p
->type
= string_dup(type
);
44 if ((q
= all_data
) == ((void *)0))
47 while (q
->link
!= ((void *)0))
53 static void parse_tbl(char *buffer
) {
55 char *t
= s
+ strlen(s
);
59 if (((*__ctype_b_loc())[(int)(((int)*t
))] & (unsigned short int)_ISspace
))
64 while (((*__ctype_b_loc())[(int)(((int)*s
))] & (unsigned short int)_ISspace
))
69 if (*buffer
!= ';' && *buffer
!= '\0') {
71 store_data(buffer
, ""); /* { dg-bogus "leak" "PR analyzer/107158" { xfail *-*-* } } */
74 while (*s
&& !((*__ctype_b_loc())[(int)(((int)*s
))] &
75 (unsigned short int)_ISspace
))
78 ((*__ctype_b_loc())[(int)(((int)*s
))] & (unsigned short int)_ISspace
))
80 store_data(buffer
, s
); /* { dg-bogus "leak" "PR analyzer/107158" { xfail *-*-* } } */