1 /* { dg-additional-options "-Wno-analyzer-too-complex" } */
3 typedef __SIZE_TYPE__
size_t;
5 extern void *calloc (size_t __nmemb
, size_t __size
)
6 __attribute__ ((__nothrow__
, __leaf__
, __malloc__
, __alloc_size__ (1, 2)));
8 extern char *strdup (const char *__s
)
9 __attribute__ ((__nothrow__
, __leaf__
, __malloc__
, __nonnull__ (1)));
11 extern void abort (void)
12 __attribute__ ((__nothrow__
, __leaf__
, __noreturn__
));
14 extern int getopt (int ___argc
, char *const *___argv
, const char *__shortopts
)
15 __attribute__ ((__nothrow__
, __leaf__
, __nonnull__ (2, 3)));
18 extern void free (void *__ptr
)
19 __attribute__ ((__nothrow__
, __leaf__
));
21 char *xstrdup(const char *src
) {
22 char *val
= strdup(src
);
32 int main(int argc
, char *argv
[]) {
33 struct test
*options
= (struct test
*) calloc(1, sizeof(*options
));
38 while ((rc
= getopt(argc
, argv
, "a:b:")) != -1) {
42 options
->one
= xstrdup(optarg
);
46 options
->two
= xstrdup(optarg
);