1 /* { dg-additional-options "-Wno-analyzer-too-complex" } */
3 extern char *strdup (const char *__s
)
4 __attribute__ ((__nothrow__
, __leaf__
, __malloc__
, __nonnull__ (1)));
6 extern void abort (void)
7 __attribute__ ((__nothrow__
, __leaf__
, __noreturn__
));
9 extern int getopt (int ___argc
, char *const *___argv
, const char *__shortopts
)
10 __attribute__ ((__nothrow__
, __leaf__
, __nonnull__ (2, 3)));
13 extern void free (void *__ptr
)
14 __attribute__ ((__nothrow__
, __leaf__
));
16 #include "../../gcc.dg/analyzer/analyzer-decls.h"
18 char *xstrdup(const char *src
) {
19 char *val
= strdup(src
);
25 int main(int argc
, char *argv
[]) {
26 char *one
= NULL
, *two
= NULL
;
29 while ((rc
= getopt(argc
, argv
, "a:b:")) != -1) {
33 one
= xstrdup(optarg
);
37 two
= xstrdup(optarg
);