aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/weak-incomplete.c
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-05-26 01:22:57 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-05-26 01:22:57 +0000
commitc6c14d1cd68afcd90d097715296377f15be45210 (patch)
treef5c3a779c2b0deea975ff96cc3453cfd1ff19d19 /test/CodeGen/weak-incomplete.c
parente9263729b701cb02201907c6942cada72d5eefbf (diff)
Handle the edge case of a weak function with incomplete type correctly.
Found by code inspection; I haven't seen this in real-world code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/weak-incomplete.c')
-rw-r--r--test/CodeGen/weak-incomplete.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/CodeGen/weak-incomplete.c b/test/CodeGen/weak-incomplete.c
new file mode 100644
index 0000000000..a15dbac03c
--- /dev/null
+++ b/test/CodeGen/weak-incomplete.c
@@ -0,0 +1,5 @@
+// RUN: clang-cc -emit-llvm < %s | grep 'extern_weak' | count 1
+
+struct S;
+void __attribute__((weak)) foo1(struct S);
+void (*foo2)(struct S) = foo1;