diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Feature/EscapingFunctions.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/Feature/EscapingFunctions.c b/test/Feature/EscapingFunctions.c index 8c9612a5..bb9b8a4a 100644 --- a/test/Feature/EscapingFunctions.c +++ b/test/Feature/EscapingFunctions.c @@ -3,6 +3,8 @@ // RUN: %klee -debug-print-escaping-functions --output-dir=%t.klee-out %t.bc 2> %t.log // RUN: FileCheck --input-file=%t.log %s +#include <stdint.h> + int functionpointer(void) { return 1; } @@ -33,6 +35,9 @@ two: return 2; } +int function_declaration(void); +uint8_t bitcasted_function_declaration(void); + int main(int argc, char *argv[]) { int (*f1)(void) = functionpointer; f1(); @@ -44,6 +49,12 @@ int main(int argc, char *argv[]) { blockaddress(argc); - // CHECK: KLEE: escaping functions: {{\[((functionpointer|functionpointer_as_argument|bitcasted_functionpointer), ){3}\]}} + int (*f3)(void) = function_declaration; + f3(); + + uint64_t (*f4)(void) =(uint64_t (*)(void))bitcasted_function_declaration; + f4(); + + // CHECK: KLEE: escaping functions: {{\[((functionpointer|functionpointer_as_argument|bitcasted_functionpointer|function_declaration|bitcasted_function_declaration), ){5}\]}} return 0; } |