test for compound call
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 7 Jun 2006 15:54:53 +0000 (15:54 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 7 Jun 2006 15:54:53 +0000 (15:54 +0000)
ir/be/test/structcall.c [new file with mode: 0644]

diff --git a/ir/be/test/structcall.c b/ir/be/test/structcall.c
new file mode 100644 (file)
index 0000000..e0c8f52
--- /dev/null
@@ -0,0 +1,18 @@
+struct A {
+  int a;
+  int b;
+};
+
+int test(struct A arg) {
+  return arg.a + arg.b;
+}
+
+int main(int argc, char *argv[]) {
+  struct A a;
+
+  a.a = 3;
+  a.b = 4;
+
+  printf("Sum = %d\n", test(a));
+  return 0;
+}