aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-06-16 17:39:02 +0000
committerChris Lattner <sabre@nondot.org>2009-06-16 17:39:02 +0000
commitc581e6eb7fe65ec845a10e1fee8e734d058e4ede (patch)
treed71fd2fae6018de70de695dc44a9bf5ea6e67225
parentff1d4d97a191ca84a703ef8d6c71ef6934090c4d (diff)
testcase for r72869, it turns out that it happens in Ruby.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73514 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGen/call-knr-indirect.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/call-knr-indirect.c b/test/CodeGen/call-knr-indirect.c
new file mode 100644
index 0000000000..17be015bff
--- /dev/null
+++ b/test/CodeGen/call-knr-indirect.c
@@ -0,0 +1,11 @@
+// RUN: clang %s -O0 -emit-llvm -S -o - | grep 'call.*rb_define_global_function'
+// This should call rb_define_global_function, not rb_f_chop.
+
+void rb_define_global_function (const char*,void(*)(),int);
+static void rb_f_chop();
+void Init_String() {
+ rb_define_global_function("chop", rb_f_chop, 0);
+}
+static void rb_f_chop() {
+}
+