diff options
author | John McCall <rjmccall@apple.com> | 2010-04-28 00:00:30 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-04-28 00:00:30 +0000 |
commit | d06fb865eba3f85d80c38172b00c6895c89c9b3f (patch) | |
tree | 156609d4db5cd22464a42432716aa4709893d2e0 /clang/test/CodeGen/functions.c | |
parent | 12f6855f850c99f7d222a07d560020d5c2774a16 (diff) | |
download | bcm5719-llvm-d06fb865eba3f85d80c38172b00c6895c89c9b3f.tar.gz bcm5719-llvm-d06fb865eba3f85d80c38172b00c6895c89c9b3f.zip |
Properly pass the address of a lazily-generated function declaration with
incomplete type. Fixes PR6911.
llvm-svn: 102473
Diffstat (limited to 'clang/test/CodeGen/functions.c')
-rw-r--r-- | clang/test/CodeGen/functions.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGen/functions.c b/clang/test/CodeGen/functions.c index 5629ef582a6..a2c692d0ce3 100644 --- a/clang/test/CodeGen/functions.c +++ b/clang/test/CodeGen/functions.c @@ -47,3 +47,15 @@ void f7(float f, float g) { // CHECK: define void @f7(float{{.*}}, float{{.*}}) // CHECK: call void @f6(float{{.*}}, float{{.*}}) } + +// PR6911 - incomplete function types +struct Incomplete; +void f8_callback(struct Incomplete); +void f8_user(void (*callback)(struct Incomplete)); +void f8_test() { + f8_user(&f8_callback); +// CHECK: define void @f8_test() +// CHECK: call void @f8_user({{.*}}* bitcast (void ()* @f8_callback to {{.*}}*)) +// CHECK: declare void @f8_user({{.*}}*) +// CHECK: declare void @f8_callback() +} |