From 1e4bed7a41073ec92f44b6449ef38cc9a0821cf0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 25 Jul 2003 20:55:08 +0000 Subject: [PATCH] Remove testcase which has been automatized git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7325 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/DSGraphs/ggfuncptr.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 test/DSGraphs/ggfuncptr.c diff --git a/test/DSGraphs/ggfuncptr.c b/test/DSGraphs/ggfuncptr.c deleted file mode 100644 index 93491248555..00000000000 --- a/test/DSGraphs/ggfuncptr.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Test resolvable and unresolvable calls through function pointers: - * -- both should be retained in function graphs until resolved or until main - * -- former should get resolved in or before main() and never appear in GG - * -- latter should remain unresolved in main() and copied to GG - * -- globals in GG pointed to by latter should be marked I, but not other nodes - */ - -#include - -extern void exit_dummy(int*); - -static int X, M, Z; - -void makeCalls(void(*GpKnown)(int*), void(*GpUnknown)(int*)) -{ - if (Z == 0) GpUnknown(&X); /* pass to exit_dummy: never resolved */ - else GpKnown(&M); /* pass to knownF: resolved in main*/ - ++Z; - printf("&Z = %p\n", &Z); /* "known external": resolved here */ -} - -void knownF(int* Y) -{ - if (Y == 0) knownF(Y); /* direct call to self: resolved here */ -} - -int main(int argc, char** argv) -{ - void(*GpKnown)(int*) = knownF; - void(*GpUnknown)(int*) = exit_dummy; - Z = argc; - makeCalls(GpKnown, GpUnknown); - return 0; -} -- 2.34.1