Changes in directory llvm-test/SingleSource/UnitTests:
2006-01-29-SimpleIndirectCall.c added (r1.1) --- Log message: new testcase for PR704: http://llvm.cs.uiuc.edu/PR704 --- Diffs of the changes: (+18 -0) 2006-01-29-SimpleIndirectCall.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+) Index: llvm-test/SingleSource/UnitTests/2006-01-29-SimpleIndirectCall.c diff -c /dev/null llvm-test/SingleSource/UnitTests/2006-01-29-SimpleIndirectCall.c:1.1 *** /dev/null Sun Jan 29 14:48:49 2006 --- llvm-test/SingleSource/UnitTests/2006-01-29-SimpleIndirectCall.c Sun Jan 29 14:48:39 2006 *************** *** 0 **** --- 1,18 ---- + // PR704 + + #include <stdio.h> + + void hello() { + printf("Hello, world!\n"); + } + + void goodbye() { + printf("Goodbye, world!\n"); + } + + int main(int argc, char **argv) { + void (*f)() = (argc > 1) ? &hello : &goodbye; + f(); + return 0; + } + _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits