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;
15 typedef struct input_file_st input_file
;
17 static inline const char*
18 get_input_file_name (const input_file
*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 } */
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 } */