[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/2006-01-29-SimpleIndirectCall.c
Chris Lattner
lattner at cs.uiuc.edu
Sun Jan 29 12:48:51 PST 2006
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;
+ }
+
More information about the llvm-commits
mailing list