]> granicus.if.org Git - clang/commitdiff
testcase for r72869, it turns out that it happens in Ruby.
authorChris Lattner <sabre@nondot.org>
Tue, 16 Jun 2009 17:39:02 +0000 (17:39 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 16 Jun 2009 17:39:02 +0000 (17:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73514 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/call-knr-indirect.c [new file with mode: 0644]

diff --git a/test/CodeGen/call-knr-indirect.c b/test/CodeGen/call-knr-indirect.c
new file mode 100644 (file)
index 0000000..17be015
--- /dev/null
@@ -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() {
+}
+