From: Chris Lattner Date: Tue, 16 Jun 2009 17:39:02 +0000 (+0000) Subject: testcase for r72869, it turns out that it happens in Ruby. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c581e6eb7fe65ec845a10e1fee8e734d058e4ede;p=clang 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 --- 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() { +} +