Skip several analyzer socket tests on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / inlining-3.c
blob0345585bed2aa9383ffa96872f5678f4fddfae34
1 /* Verify that we can reconstruct fndecl and stack depth information
2 after early inlining. */
4 /* { dg-additional-options "-O2 -fdiagnostics-show-path-depths" } */
6 #include "../../gcc.dg/analyzer/analyzer-decls.h"
7 typedef __SIZE_TYPE__ size_t;
10 struct input_file_st
12 char inpname[1];
15 typedef struct input_file_st input_file;
17 static inline const char*
18 get_input_file_name (const input_file *inpf)
20 if (inpf)
21 /* { dg-message "following 'false' branch \\(when 'inpf' is NULL\\)\\.\\.\\. \\(fndecl 'get_input_file_name', depth 2\\)" "" { target c } .-1 } */
22 /* { dg-message "following 'false' branch \\(when 'inpf' is NULL\\)\\.\\.\\. \\(fndecl 'const char\\* get_input_file_name\\(const input_file\\*\\)', depth 2\\)" "" { target c++ } .-2 } */
23 return inpf->inpname;
24 return NULL;
27 size_t
28 test (const input_file *inpf)
30 const char *f = get_input_file_name (inpf);
31 return __builtin_strlen (f); /* { dg-warning "use of NULL" "warning" } */
32 /* { dg-message "NULL where non-null expected \\(fndecl 'test', depth 1\\)" "message" { target c } .-1 } */
33 /* { dg-message "NULL where non-null expected \\(fndecl 'size_t test\\(const input_file\\*\\)', depth 1\\)" "message" { target c++ } .-2 } */