diff options
Diffstat (limited to 'clang/test/CodeGen/cfi-icall-cross-dso2.c')
-rw-r--r-- | clang/test/CodeGen/cfi-icall-cross-dso2.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGen/cfi-icall-cross-dso2.c b/clang/test/CodeGen/cfi-icall-cross-dso2.c new file mode 100644 index 00000000000..acc72a7ee76 --- /dev/null +++ b/clang/test/CodeGen/cfi-icall-cross-dso2.c @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux -O1 -fblocks \ +// RUN: -fsanitize=cfi-icall -fsanitize-cfi-cross-dso \ +// RUN: -emit-llvm -o - %s | FileCheck %s + +// CHECK: define void @f() {{.*}} !type !{{.*}} !type !{{.*}} +void f(void); +void (*pf)(void) = f; +void f(void) { } + +// Check that we do not crash on non-FunctionDecl definitions. +void (^g)(void) = ^{}; |