IRA: Ignore debug insns for uses in split_live_ranges_for_shrink_wrap. [PR116179]
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / pr103217-4.c
blob516e1f4f9974df1ad2806bb5ca35a2eb3f3c66bb
1 extern char *strdup (const char *__s)
2 __attribute__ ((__nothrow__ , __leaf__, __malloc__, __nonnull__ (1)));
4 extern void abort (void)
5 __attribute__ ((__nothrow__ , __leaf__, __noreturn__));
7 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
8 __attribute__ ((__nothrow__ , __leaf__, __nonnull__ (2, 3)));
9 extern char *optarg;
11 extern void free (void *__ptr)
12 __attribute__ ((__nothrow__ , __leaf__));
14 struct state {
15 const char *confpath;
16 const char *host;
17 const char *port;
18 const char *state_dir_prefix;
21 static inline char *xstrdup(const char *s) {
22 char *val = strdup(s);
23 if (!val)
24 abort();
25 return val;
28 int config_init(struct state *config);
30 int main(int argc, char *argv[]) {
31 int rc;
32 struct state state = { 0 };
34 config_init(&state);
36 if ((rc = getopt(argc, argv, "H:p:")) != -1) {
37 switch (rc) {
38 case 'H':
39 free((void*)state.host);
40 state.host = xstrdup(optarg);
41 break;
42 case 'p':
43 free((void*)state.port);
44 state.port = xstrdup(optarg);
45 break;
49 free((void*)state.host);
50 free((void*)state.port);
51 return rc;